Mr Quek bought some guppies at $9 each. He also bought an equal number of fighting fishes at a different price. The average price of a guppy and a fighting fish was $6. Mr Quek paid $24 less for the fighting fishes than the guppies. How many guppies did he buy?