Sam cut a pie into equal slices. There are only three slices left. The angle measure for the three slices is 72 degrees. How many slices did Sam cut the pie into?