Scooter the clown buys flower hats for $27 each and plain hats for $22 each. If he spends a total of $250 on hats, how many hats have flowers?