UVa 417 accepted