The best place to get this number is from your originally-filed 2016 federal tax return.
Even if you amended it later, you must use the AGI from the 2016 return you originally filed, even if it's way off. Choose the 1040 variant you filed last year (below) to see which line shows your 2016 AGI.
Don't have a copy of last year's return? You can order a transcript from the IRS. Go to their Get Transcript site, choose Get Transcript Online, and follow the directions (if you don't already have an account, you'll need to set one up).
One thing's for sure – you won't find your 2016 AGI on last year's W-2 or 1099 form.