Solved UVa 467