1 2 3 4 5 6 7 8 9 10
def s(n): i = n-1 sum = 0 while i >= 1: sum += i i -= 1 return sum print s(1500)