UVa 11547: simple math operation