You bought a magazine for $6 and some notepads for $3 each. You spent a total of $18. How many notepads did you buy?