Calculate the summation of a given number