Problem 85 (Java)