John adopts a dog from a shelter.  The dog ends up having health problems and this requires 3 vet appointments,  which cost $400 each.  After the first appointment, John paid $100 for pet insurance that covers 80% of the subsequent visits.  How much did he pay in total? Let's think step by step and output the final answer after "####".
user
He got a discount of 400*.8=$<<400*.8=320>>320
He got that discount for 3-1=<<3-1=2>>2 visits
So each of those visits cost 400-320=$<<400-320=80>>80
So he paid 2*80=$<<2*80=160>>160 for those visits
That means he paid a total of 400+160+100=$<<400+160+100=660>>660
#### 660
John adopts a dog from a shelter.  The dog ends up having health problems and this requires 3 vet appointments,  which cost $400 each.  After the first appointment, John paid $100 for pet insurance that covers 80% of the subsequent visits.  How much did he pay in total?
train