Art of Problem Solving

1986 AIME Problems/Problem 2