Solved UVa 111