if a shop owner purchased 20 pairs pf gloves at $12 each and some hats for $25 each, how many hats did he buy if he spent a total of $490