Game of Sum

UVa 10892