Solved UVa 10855