(java) Solved problem 67