CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
l = []
cnt = 0
for i in range(n):
    x = int(eval(input()))
    l.append(x)

x = set()
for i in l:
    if i in x:
        continue
    else:
        x.add(i)
        if l.count(i)%2 ==1:
            #print(i, l.count(i))
            cnt+=1
print(cnt)

# Optimized solution
n = int(eval(input()))
l = []
cnt = 0
for i in range(n):
    x = int(eval(input()))
    l.append(x)


x = sorted(l)
i=1
same=1
while i<n:
    if x[i]==x[i-1]:
        same += 1
    else:
        if same%2 == 1:
            cnt += 1
        same = 1
    i += 1

cnt += same%2
print(cnt)
# Original solution
N = int(eval(input()))
p = []

for i in range(N):
    a = int(eval(input()))
    if not a in p:
        p.append(a)
    else:
        p.remove(a)

print((len(p)))


# Optimized solution
N = int(eval(input()))
p = []

for i in range(N):
    p.append(eval(input()))

p.sort()
c = 1
ans = 0
for i in range(1, len(p)):
    if p[i] == p[i - 1]:
        c += 1
    else:
        if c % 2 == 1:
            ans += 1
        c = 1
if c % 2 == 1:
    ans += 1
print(ans)
# Original solution
import sys
from collections import defaultdict

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *A = list(map(int, read().split()))

    d = defaultdict(bool)
    for a in A:
        if d[a]:
            d[a] = False
        else:
            d[a] = True

    ans = sum(1 for f in list(d.values()) if f)
    
    print(ans)
    return


if __name__ == '__main__':
    main()


# Optimized solution
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, *A = list(map(int, read().split()))

    d = dict()
    for a in A:
        if a in d and d[a]:
            d[a] = False
        else:
            d[a] = True

    ans = sum(1 for flag in list(d.values()) if flag)

    print(ans)
    return


if __name__ == '__main__':
    main()
# Original solution
a=int(eval(input()))
ans=0
for i in range(1,a+1,1):
  x=a//i
  ans+=((x**2+x)//2)*i
print(ans)

# Optimized solution
a=int(eval(input()))
b=(a)//2+1
ans=0
for i in range(1,b,1):
  x=a//i
  ans+=((x**2+x)//2)*i
ans+=(a**2+a+b-b**2)//2
print(ans)
# Original solution
import math

N = int(eval(input()))
ans = 0

for i in range(1,N+1):
  ans += int( i*( (N//i)+1 )*(N//i)/2 )
  
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-

N = int(eval(input()))
ans = 0

for i in range(1,N+1):
  ans += i*( (N//i)+1 )*(N//i)/2
  
print((int(ans)))
# Original solution
import math
n=int(eval(input()))
ans=0
for i in range(1,n+1):
	ans+=((math.floor(n/i)*(math.floor(n/i)+1))/2)*i
print((int(ans)))

# Optimized solution
import math
n=int(eval(input()))
ans=0
for i in range(1,n+1):
	x=math.floor(n/i)
	ans+=(x*(x+1)*i)/2
print((int(ans)))
# Original solution
n = int(eval(input()))

ans = 0
for i in range(1, n//2 + 1):
    ans += i * (n//i) * (n//i + 1) // 2

ans += (n + n//2 + 1) * (n - n//2) // 2

print(ans)

# Optimized solution
def main():
    n = int(eval(input()))

    ans = 0
    for i in range(1, n//2 + 1):
        ans += i * (n//i) * (n//i + 1) // 2

    ans += (n + n//2 + 1) * (n - n//2) // 2

    print(ans)

main()
# Original solution
n = int(eval(input()))

result = 0
for i in range(1,(n + 1)):
    terms = n // i
    result += terms * (terms * i + i) // 2

print(result)

# Optimized solution
n = int(eval(input()))

result = 0
for i in range(1,(n // 2 + 1)):
    terms = n // i
    result += terms * (terms * i + i) // 2

terms = n - n // 2
result += terms * (n // 2 + 1 + n) // 2

print(result)
# Original solution
import math

n = int(eval(input()))
ans = 0
SQRT = int(n ** 0.5)
for m in range(1,int(n ** 0.5) + 1):
    ans += m * (m + int(n/m)) * (int(n/m) + 1 - m)
ans -= SQRT * (SQRT+1) * (2*SQRT+1) // 6
print(ans)


# Optimized solution
n = int(eval(input()))
ans = 0
SQRT = int(n ** 0.5)
for m in range(1,SQRT + 1):
    b = int(n/m)
    ans += m * (m + b) * (b + 1 - m)
ans -= SQRT * (SQRT+1) * (2*SQRT+1) // 6
print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for x in range(1,n+1):
    y = int(n/x)
    ans += y*(y+1)*x//2

print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for x in range(1,n+1,1):
    y = int(n/x)
    ans += y*(y+1)*x/2

print((int(ans)))
# Original solution
n=int(eval(input()))
ans=0
for i in range(1,n+1):
    m=n//i*i
    k=n//i
    ans+=(k*(i+m)//2)
print(ans)

# Optimized solution
n=int(eval(input()))
ans=0
for i in range(1,n+1):
    #m=n//i*i
    #k=n//i
    ans+=((n//i)*(i+(n//i*i))//2)
    #ans+=(k*(i+m)//2)
print(ans)
# Original solution
n=int(eval(input()))
def f(x):
  tmp=(n//x)*(n//x+1)//2
  return x*tmp

ans=sum(map(f,list(range(1,n+1))))
print(ans)

# Optimized solution
n=int(eval(input()))
print((sum([n//x*(n//x+1)//2*x for x in range(1,n+1)])))
# Original solution
n = int(eval(input()))

ans = 0

for i in range(1, n + 1):
    if i == 1:
        ans += sum(range(1,n + 1))
    else:
        t = n//i
        ans += 0.5 * i * t * ( t + 1)

print((int(ans)))

# Optimized solution
n = int(eval(input()))

ans = 0

for i in range(1, n + 1):
    t = n//i
    ans += 0.5 * i * t * ( t + 1)

print((int(ans)))
# Original solution
n=int(eval(input()))
s=0
for i in range (1,n+1):
    a=n//i
    z=a*(a+1)*i//2
    s+=z
print(s)


# Optimized solution
n=int(eval(input()))
s=0
for i in range (1,n+1):
    a=n//i
    s+=a*(a+1)*i//2
print(s)
# Original solution
n=int(eval(input()))
s=0
for i in range (1,n+1):
    a=n//i
    s+=(a*a+a)*i//2
print(s)

# Optimized solution
n=int(eval(input()))
s=0
for i in range (1,n+1):
    a=n//i
    s+=(a*a+a)*i
print((s//2))
# Original solution
N = int(eval(input()))

t = 0

for i in range (1,N+1):
  p = N//i
  s = int(i*p*(1+p)/2)
  t = t+s

print(t)

# Optimized solution
N = int(eval(input()))

t = 0

for i in range (1,N+1):
  p = N//i
  t += i*p*(1+p)/2
  

print((int(t)))
# Original solution
n = int(eval(input()))
def func(n):
    return int(((n+1)*n)/2)
a = 0
for i in range(1, n+1):
    a += i * func(n // i)
print(a)

# Optimized solution
n = int(eval(input()))
a = n * (n+1) // 2
for i in range(2, n+1):
  c = n // i
  a += i * (c * (c+1) // 2)
print(a)
# Original solution
n = int(eval(input()))
ans = 0

for x in range(1, n+1):
  k = n//x
  ans += k*(2*x + (k-1)*x)//2
  
print(ans)


# Optimized solution
n=int(eval(input()))
ans=0
for i in range(1,n+1):
  k=n//i
  ans+=i*(k*(k+1)//2)
print(ans)
# Original solution
#!/usr/bin/env python3

n = int(eval(input()))

ans = 0
for i in range(1, n+1):
    num = n//i
    ans += (i+i*num)*num//2

print(ans)


# Optimized solution
#!/usr/bin/env python3

n = int(eval(input()))

ans = 0
for i in range(1, n+1):
    num = n//i
    ans += (1+num)*i*num//2

print(ans)
# Original solution
def main():
    n = int(eval(input()))
    ans = 0
    for i in range(1, n+1):
        # y = n // i
        # y = (y+1)*y*i//2
        ans += ((n//i)+1) * (n//i) * i // 2
    print(ans)
    
if __name__ == '__main__':
    main()

# Optimized solution
def main():
    n = int(eval(input()))
    ans = 0
 
    for i in range(1, n+1):
        y = n // i
        ans += (y+1)*y*i//2
    print(ans)
 
if __name__ == '__main__':
    main()
# Original solution
n=int(eval(input()))
d=0

for i in range(1,n+1):

    a=i
    b=(n//i)*i
    c=b//i -a//i+1
    d+=(c*(a+b))//2

    

print(d)


# Optimized solution
n=int(eval(input()))
#n=10000000
ksum=0
for k in range(1,n+1):
    m=n//k
    ksum+=k*m*(m+1)//2
    
print(ksum)
# Original solution
n = int(eval(input()))
su = 0
for i in range(1,n+1):
  a = i
  l = (n//i)*i
  m = (n//i)/2
  su += m*(a+l)
print((int(su)))

# Optimized solution
n = int(eval(input()))
su = 0
for i in range(1,n+1):
  t = n//i
  l = t*i
  m = t/2
  su += m*(i+l)
print((int(su)))
# Original solution
import math
n = int(eval(input()))

ans = 0

for j in range(1,n+1):
    y = math.floor(n/j)
    ans += y*(y+1)*j/2

print((int(ans)))


# Optimized solution
import math
n = int(eval(input()))

ans = 0

for j in range(1,n+1):
    y = n//j
    ans += y*(y+1)*j/2

print((int(ans)))
# Original solution
n = int(eval(input()))
ans = 0

for i in range(1, n+1):
    a1 = i
    d = i
    nn = n // i
    ans += (nn * (2*a1 + (nn-1)*d)) // 2
    # print(i,ans,a1,nn,d)

print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1, n+1):
    m = n//i
    ans += (2*i*m + (m-1)*i*m) // 2
print(ans)
# Original solution
#!python3

import sys
iim = lambda: list(map(int, sys.stdin.readline().rstrip().split()))

def resolve():
    N = int(eval(input()))

    ans = 0
    for i in range(1, N+1):
        j = N // i
        ans +=  i * j * (1+ j) // 2
    print(ans)

if __name__ == "__main__":
    resolve()


# Optimized solution
#!python3

import sys
iim = lambda: list(map(int, sys.stdin.readline().rstrip().split()))

def resolve():
    N = int(eval(input()))

    ans = 0
    N2 = N//2
    for i in range(1, N2+1):
        j = N // i
        ans +=  i * j * (1+ j) // 2
    ans += (N2+1 + N) * (N-N2) // 2
    print(ans)

if __name__ == "__main__":
    resolve()
# Original solution
def solve(n):
    ans=0
    for d in range(1,n+1):
        c=n//d
        ans+=(c+1)*c//2*d
    return ans

n=int(eval(input()))
print((solve(n)))


# Optimized solution
# O(sqrt(N))solution

def solve(n):
    ans = 0
    r = n
    for c in range(1, n + 1):
        l = n // (c + 1)
        if r - l == 1: break
        ans += (l + 1 + r) * (r - l) // 2 * c * (c + 1) // 2
        r = l
    for d in range(1, r + 1):
        c = n // d
        ans += (c + 1) * c // 2 * d
    return ans

n=int(eval(input()))
print((solve(n)))
# Original solution
N = int(eval(input()))

sum = 0

for j in range(1,N+1):
    k = int(N/j)
    sum += int((1+k)*k/2*j)

print(sum)

# Optimized solution
N = int(eval(input()))

sum = 0

for j in range(1,N+1):
    k = N//j
    sum += (1+k)*k*j//2
print(sum)
# Original solution
N = int(eval(input()))
 
sum = 0
for n in range(1,N+1):
    num = int(N/n)
    s = int(((1+num)*num)/2)
    sum += n*s
print(sum)

# Optimized solution
N = int(eval(input()))
 
sum = 0
for n in range(1,N+1):
    num = N//n
    s = ((1+num)*num)//2
    sum += n*s
print(sum)
# Original solution
N = int(eval(input()))
ans = 0
for i in range(1, N + 1):
    a = i * (N // i) * (N // i + 1) / 2
    ans += round(a)
print(ans)

# Optimized solution
N = int(eval(input()))
ans = 0
for i in range(1, N + 1):
    b = N // i
    ans += i * b * (b + 1) // 2
print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1, n + 1):
    k = n // i
    ans += k * (i + i * k) // 2
print(ans)


# Optimized solution
from functools import reduce

n = int(eval(input()))
def f(x, y):
    k = n // y
    return x + k * (y + y * k) // 2

ans = reduce(f, list(range(n + 1)))
print(ans)
# Original solution
# Problem D - Sum of Divisors

# input
N = int(eval(input()))

# initialization
ans = 0

# count
for j in range(1, N+1):
    Y = N // j
    ans += ((Y * (Y + 1))*j) // 2

# output
print(ans)


# Optimized solution
# Problem D - Sum of Divisors

# input
N = int(eval(input()))

# initialization
count = 0

# count
for j in range(1, N+1):
    M = N // j
    count += j * ((M * (M+1)) // 2)

# output
print(count)
# Original solution
N = int(eval(input()))

r = 0

for i in range(N):
    m = i + 1
    j = int(N/(m))
    r = r + int(m*j*(1+j)/2)

print(r)    

# Optimized solution
N = int(eval(input()))
M = 0
r = 0
if N>1000000:
    M = N


for i in range(min(N,1000000)):
    m = i + 1
    j = int(N/(m))
    r = r + int(m*j*(1+j)/2)

if M!=0:
    for i in range(10):
        k = int(M/(i+1))
        if k > 1000000:
            r = r + (i+1)*int((k-1000000)*(k+1000001)/2)

print(r)
# Original solution
N=int(eval(input()))
print((sum([((N//i)*(N//i+1)//2)*i for i in range(1,N+1)])))



# Optimized solution
print((list([sum([((N//i)*(N//i+1)//2)*i for i in range(1,N+1)]) for N in [int(eval(input()))]])[0]))
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1, n + 1):
    ans += (n // i) * (i + n // i * i) // 2
print(ans)


# Optimized solution
n = int(eval(input()))
print((sum([(n // i) * (i + n // i * i) // 2 for i in range(1, n + 1)])))
# Original solution
N=int(eval(input()))
ans=0
for i in range(1,N+1):
  Y=int(N//i)
  ans+=int(Y*(Y+1)*i/2)
print(ans)

# Optimized solution
N=int(eval(input()))
ans=0
for i in range(1,N+1):
  Y=N//i
  ans+=Y*(Y+1)*i//2
print((int(ans)))
# Original solution
# -*- coding: utf-8 -*-
# 標準入力を取得
N = int(eval(input()))

def g(N: int) -> int:
    return int(N * (N + 1) / 2)

# 求解処理
ans = 0
for n in range(1, N + 1):
    ans += n * g(N // n)
            
# 結果出力
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-

def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(eval(input()))

    return N


def g(N: int) -> int:
    """
    1~Nの総和を求める.

    Args:\n
        N (int): 正整数

    Returns:\n
        int: 1~Nの総和
    """
    return int(N * (N + 1) / 2)


def main(N: int) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 正整数（1 <= N <= 10^7）
    """
    # 求解処理
    ans = 0
    for n in range(1, N + 1):
        ans += n * g(N // n)

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N = get_input()

    # メイン処理
    main(N)
# Original solution
n = int(eval(input()))
ans = 0
for a in range(1,n+1):
    y = n//a
    ans+=int((y*(y+1)*a)/2)
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for a in range(1,n+1):
    y = n//a
    ans+=(y*(y+1)*a)//2
print(ans)
# Original solution
n=int(eval(input()))
t=0
k=0
for i in range(1,n+1):
   k=n//i
   t+=i*k*(k+1)//2

print(t)


# Optimized solution
N = int(eval(input()))
 
s=k=kn=0;n=N
while k<n:
	k += 1
	n = N//k
	kn = k*n*(n+1)
	s += 4*kn
s -= (k+1)*kn
if n<k:
	s -= 2*kn 
print((s//4))
# Original solution
n = int(eval(input()))
s = 0
for i in range(1, n+1):
	x = n // i
	s += i * (x * (x+1)) / 2 
print((int(s)))

# Optimized solution
n = int(eval(input()))

s = 0
q = int(n ** .5)
for i in range(1, q+1):
	x = n // i
	s += i * (x * (x+1)) / 2
	if x**2 != n:
		y = max(n // (i+1), q)
		s += (i * (i+1) // 2) * ((x * (x+1) // 2) - (y * (y+1) // 2))

print((int(s)))
# Original solution
def main():
    n = int(eval(input()))

    ans = 0
    l = n
    i = 1
    while l > 0:
        k = i*(i+1)//2
        l_n = n//(i+1)
        ans += k*(l*(l+1)//2-l_n*(l_n+1)//2)
        l = l_n
        i+=1
    
    print(ans)
main()

# Optimized solution
def main2():
    n = int(eval(input()))
    ans = 0

    for i in range(1,n+1):
        k = n//i
        ans+= i*(k*(k+1)//2)
    
    print(ans)
main2()
# Original solution
N=int(eval(input()))
sum=0
for j in range(1,N+1):
    sum+=int(((N//j)*(N//j+1)/2)*j)
print(sum)


# Optimized solution
N=int(eval(input()))
sum=0
for j in range(1,N+1):
    sum+=((N//j)*(N//j+1)//2)*j
print(sum)
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1, n + 1):
    ans += int(n // i) * int(n // i + 1) * i // 2
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0

for i in range(1, n + 1):
    y = n // i
    ans += y * (y+1) * i // 2
print(ans)
# Original solution
N = int(eval(input()))
x=0
for i in range (N):
    n = N // (i+1)
    cnt = (n * (2 * (i+1) + (n - 1) * (i+1))) // 2  
    x += cnt
print(x)

# Optimized solution
N = int(eval(input()))
ans = 0
for i in range(1, N + 1):
    n = N // i  # 項数n
    cnt = (n * (2 * i + (n - 1) * i)) // 2  # 初項i, 項数n の等差数列の和の公式
    ans += cnt
print(ans)
# Original solution
import sys
#import string
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def su(N):
    return N*(N+1) / 2

def solve():
    n = int(stdin.readline().rstrip())
    #A, B, C = map(int, stdin.readline().rstrip().split())
    #l = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    #word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    ans = 0
    for i in range(1,n+1):
        ans += i * su(n//i)
    print((int(ans)))



if __name__ == '__main__':
    solve()


# Optimized solution
import sys
#import string
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    n = int(stdin.readline().rstrip())
    #A, B, C = map(int, stdin.readline().rstrip().split())
    #l = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    #word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    ans = 0
    for i in range(1,n+1):
        ans += i * (n//i)*((n//i)+1) / 2
    print((int(ans)))



if __name__ == '__main__':
    solve()
# Original solution
#D
n = int(eval(input()))
#約数の数を求める＞＞倍数であり、n以下であるものの総和を求める
# >>
#等差数列の和(初項a:公差d:n番目の項まで)
def Sun_of_Arithmetic_sequence(a, d, n):
    return (2 * a + (n - 1) * d) * n // 2
    
ans = 0
for i in range(1, n + 1):
    #iの倍数の数を求める
    m = n // i
    #初項i:公差i:m項までの等比数列の和
    ans += Sun_of_Arithmetic_sequence(i, i, m)
print(ans)

# Optimized solution
#D
n = int(eval(input()))
#約数の数を求める＞＞倍数であり、n以下であるものの総和を求める

ans = 0
for i in range(1, n + 1):
    #iの倍数の数を求める
    m = n // i
    #初項i:公差i:m項までの等比数列の和
    ans += m * (2 * i + i * (m - 1)) *0.5
print((int(ans)))
# Original solution
def main():
    num = int(eval(input()))
    ans = 0

    for divisor in range(1, num + 1):
        quotient = num // divisor
        ans += (quotient + 1) * quotient * divisor // 2

    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    num = int(eval(input()))
    gg = ((
        (quotient := num // divisor) + 1) * quotient * divisor // 2
        for divisor in range(1, num + 1))
    print((sum(gg)))


if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
ans = 0
for i in range(1,N+1):
    ans += int(i*(1+N//i)*(N//i)/2)
print(ans)

# Optimized solution
N = int(eval(input()))
c = (N+1)//2
ans = 0
for i in range(1,N-c+1):
    ans += i*(1+N//i)*(N//i)/2
ans += N*c -(c-1)*c/2
print((int(ans)))
# Original solution
N=int(eval(input()))

ans = 0
for i in range(1,N+1):
    j = N//i
    ans += int(i*j*(j+1)/2)

print(ans)

# Optimized solution
N=int(eval(input()))

ans = 0
for i in range(1,N+1):
    j = N//i
    ans += i*j*(j+1)//2

print(ans)
# Original solution
N = int(eval(input()))
ans = 0
for i in range(1, N + 1):
    n = N // i  # 項数n
    cnt = (n * (2 * i + (n - 1) * i)) // 2  # 初項i, 項数n の等差数列の和の公式
    ans += cnt
print(ans)

# Optimized solution
def main():

#---------------------------------------------------------

    N = int(eval(input()))
    ans = 0
    for i in range(1, N + 1):
        n = N // i  # 項数n
        cnt = (n * (2 * i + (n - 1) * i)) // 2  # 初項i, 項数n の等差数列の和の公式
        ans += cnt
    print(ans)

#---------------------------------------------------------

if __name__ == '__main__':
   main()
# Original solution
N = int(eval(input()))

ans = 0
for i in range(1,N+1):
    y = int(N/i)
    ans += int(1/2*y*(y+1)*i)
    
print(ans)


# Optimized solution
N = int(eval(input()))

ans = 0
for i in range(1,N+1):
    y = N//i
    ans += y*(y+1)*i//2
    
print(ans)
# Original solution
N = int(eval(input()))

t = 0
for j in range(1,N+1):
  m = N//j
  t += (1+m)*m//2 * j
#
print(t)


# Optimized solution
N = int(eval(input()))

nn = N//2
t = 0
for j in range(1,nn+1):
  m = N//j
  t += (1+m)*m//2 * j
#
t += ((nn+1)+N)*(N-nn)//2
print(t)
# Original solution
def gcd_cnt(t):
    a = 0
    kosuu = n//t
    a=kosuu*(2*t + (kosuu-1)*t)//2
    return a

n = int(eval(input()))
sub = 0
#約数でそのままアクセス可能
kosuu_ls = [0]*(n+1)
for t in range(1,n+1):
    sub+=gcd_cnt(t)
print(sub)


# Optimized solution
def gcd_cnt(n):
    sub = 0
    for i in range(1, n+1):
        kosuu = n//i
        sub+=kosuu*(2*i + (kosuu-1)*i)//2
    return sub

n = int(eval(input()))
sub = gcd_cnt(n)
print(sub)
# Original solution
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    n = ni()
    ans = 0
    for i in range(1, n+1):
        v = n // i
        ans += v * (v + 1) // 2 * i
    print(ans)
    return

solve()


# Optimized solution
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    n = ni()
    m = int((n+1)**.5)
    u = n // (m + 1)
    ans = 0
    for i in range(1, u+1):
        v = n // i
        ans += v * (v + 1) // 2 * i
    for i in range(m, 0, -1):
        v = n // i
        ans += (v * (v + 1) - u * (u + 1)) // 2 * i * (i + 1) // 2
        u = v
    print(ans)
    return

solve()
# Original solution
import sys
import math
from collections import deque
input = sys.stdin.readline
#S,L,R = map(int, input().split())

N = int(eval(input()))

Answer = 0

for i in range(1,N+1):
    num = (N//i)*(N//i + 1) // 2
    num *= i
    Answer += num

print(Answer)


# Optimized solution
import sys
import math
from collections import deque
input = sys.stdin.readline
#S,L,R = map(int, input().split())

N = int(eval(input()))

A = [0]
B = []

Answer = 0

j = 1;
while j*j<=N:
    A.append(j)
    if N//j != j:
        B.append(N//j)
    j+=1

B.reverse()
A =  A + B

Answer = 0
for i in range(1,len(A)):
    num = ((N//A[i])*(N//A[i]+1)//2)
    num *= ((A[i]*(A[i]+1)//2)-(A[i-1]*(A[i-1]+1)//2))
    Answer += num

print(Answer)
# Original solution
# 解説

def main():
    N = int(eval(input()))

    ans = 0
    for div in range(1, N + 1):
        m = N // div  # div, div*2, ..., div*m
        ans += (m * (m + 1) // 2) * div
    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    from math import isqrt
    # Return the integer part of the square root of the input.

    N = int(eval(input()))

    def f(x):
        return x * (x + 1) // 2

    ans = 0
    for k in range(1, isqrt(N) + 1):
        # https://maspypy.com/atcoder-%e5%8f%82%e5%8a%a0%e6%84%9f%e6%83%b3-2020-06-27abc-172
        # a*b<=N
        # k=min(a,b)
        # k*k, k*(k+1),...,k*m
        # k*jはkの倍数かつjの倍数なので,2回計上される
        # k*kはkの倍数として1回だけ計上されるので,2回分計上して過剰分を減らす
        m = N // k
        ans += 2 * k * (f(m) - f(k - 1)) - k * k
    print(ans)


if __name__ == '__main__':
    main()
# Original solution
def main():
    N = int(eval(input()))

    def f(x):
        return x * (x + 1) // 2

    ans = 0
    for d in range(1, N + 1):
        m = N // d
        ans += d * f(m)
    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    N = int(eval(input()))
    ans = 0
    for x in range(1, N + 1):
        # x(1+2+3+...+e)
        e = N // x
        ans += x * e * (1 + e) // 2
    print(ans)


if __name__ == '__main__':
    main()