There are 504 apples. It takes 4 apples to make 1 pie. How many pies are there?