Can I deduct Lasik if I use a financing/payment plan, or can I only deduct if I pay out of pocket? And can I deduct the total surgery cost or just payments I have made?

For example, if I choose to use a payment plan instead of paying for the whole cost out of pocket - if the Lasik surgery costs $5,000, can I deduct the whole $5,000 next year on my tax return or just the payments that I make in 2017?