Fixing Problem UVa 941