def f(v,n): t = (n+1)//(2*v) - 1 res = v*v*t*(t+1) + (t+1)*v*(3*v-1)//2 x = v*(2*(t+1)+1) if n >= x: res += (n+x)*(n-x+1)//2 return res n = int(input()) ans = sum(f(1<