UVa Problem 459