Fantasy of a Summation

LightOJ - 1213