Solved UVa 11661