Wrote a program to find the number of turns whose price is exactly p