Solved UVa 908