timus; solve "Sum" from Volume 1