If the amt is $3k or less, it is subject to the 2%-of-agi limit that applies to certain miscellaneous itemized deductions on Sch A of 1040. You may claim it on Sch A , line 23. If the amt is more than $3k, you should figure your tax two ways; you need to fgure your tax for 2017 with the itemized deduction included on Sch A, line 28. Also figure your tax for 2017 in the following steps.
a. Figure the tax without the itemized deduction included on Sch A, line 28.
b. For each year after 1983 for which part of the negative figure represents a repayment of benefits, refigure your taxable benefits as if your total benefits for the year were reduced by that part of the negative figure. Then refigure the tax for that year.
c. Subtract the total of the refigured tax amounts in (b) from the total of your actual tax amounts.
d. Subtract the result in (c) from the result in (a).
Compare the tax figured in methods 1 and 2. Your tax for 2017 is the smaller of the two amounts. If method 1 results in less tax, take the itemized deduction on Schedule A (Form 1040), line 28. If method 2 results in less tax, claim a credit for the amount from step 2c above on Form 1040, line 73. Check box d and enter "I.R.C. 1341" in the space next to that box. If both methods produce the same tax, deduct the repayment on Schedule A (Form 1040), line 28.