(java) Solved problem 53