Solve this difficult math Olympiad problem