u = 5
s = 5

for n in range(1,1000):
    u = 0.5*u + 2*n - 5
    s = s + u

print(s)
