Input/output

6 18
7 21
8 24
9 27
question...
if jack buys 12 toys, what is the cost?