Art of Problem Solving

1985 AIME Problems/Problem 9