Art of Problem Solving

2015 AMC 8 Problems/Problem 24