For a positive integer X, let f(X) be the number of positive divisors of X.
Given a positive integer N, find \sum_{K=1}^N K\times f(K).

-----Constraints-----
 - 1 \leq N \leq 10^7

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the value \sum_{K=1}^N K\times f(K).

-----Sample Input-----
4

-----Sample Output-----
23

We have f(1)=1, f(2)=2, f(3)=2, and f(4)=3, so the answer is 1\times 1 + 2\times 2 + 3\times 2 + 4\times 3 =23.

Difficulty: interview

Starter code:

Solutions:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
#import numpy as np
def main():
    n = int(input())
    if n == 1:
        print((1))
        return
    r = 0
    for i1 in range(1, n + 1):
        num_of_div = n // i1
        r += num_of_div * (num_of_div + 1) // 2 * i1
    print(r)

def __starting_point():
    main()

__starting_point()

import sys
N=int(sys.stdin.readline())
ans=sum((N//x)*(N//x+1)*x//2 for x in range(1,N+1))
print(ans)


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

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

print(ans)


#!/usr/bin/env python3

#                 N    N'
#   | 1  2  3  4  5
# 1 | 1  2  3  4  5 :  N // 1   1 * N' (N'+1) // 2
# 2 |    2     4    :  N // 2   2 * N' (N'+1) // 2
# 3 |       3       :  N // 3   3 * N' (N'+1) // 2
# 4 |          4    :  N // 4   4 * N' (N'+1) // 2
# 5 |             5 :  N // 5   5 * N' (N'+1) // 2


def solve(N):
    answer = 0
    for i in range(1, N + 1):
        mprime = N // i
        answer += i * (mprime * (mprime + 1)) // 2
    return answer


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


def __starting_point():
    main()

__starting_point()

n = int(input())

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

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

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

N = int(input())

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

def solve(n):
    su = 0
    for i in range(1, n+1):
        m = n//i
        su += m*(2*i + (m-1)*i)//2
    return su

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

# AOTコンパイルテスト
import sys


def solve(n):
    su = 0
    for i in range(1, n+1):
        m = n//i
        su += m*(2*i + (m-1)*i)//2
    return su


if sys.argv[-1] == 'ONLINE_JUDGE':
    from numba.pycc import CC

    cc = CC('my_module')
    cc.export('solve', '(i8)')(solve)
    cc.compile()
    return

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

def func(n):
    return n*(n+1)//2

def main():
    import sys
    input = sys.stdin.readline

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

    print(ans)

def __starting_point():
    main()

__starting_point()

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

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

N=int(input());a=0
for i in range(1,N + 1):b=N//i;a+=(b*(b+1)*i//2)
print(a)


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

n = int(input())
cnt = 0
for i in range(1, n+1):
  cnt += i * (n // i) * (n // i + 1) // 2
print(cnt)

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
import numpy as np
def main():
    n = int(input())
    if n == 1:
        print((1))
        return
    divs = np.arange(1, n + 1)
    divs2 = n // divs
    divs3 = divs2 * (divs2 + 1) // 2
    divs3 = divs3 * divs
    r = divs3.sum()
    print(r)

def __starting_point():
    main()

__starting_point()

def main():

    N = int(input())

    ans = 0

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

    print((int(ans/2)))

def __starting_point():
    main()

__starting_point()

n=int(input());print(sum((x:=n//i)*(x+1)*i//2 for i in range(1,n+1)))

#解説AC
N=int(input())
ans=0
for i in range(1,N+1):
    max_i_multi=N//i
    ans+=(max_i_multi*(max_i_multi+1)*i)//2
print(ans)

import sys
#import numpy as np
#from collections import defaultdict
import math
#from collections import deque

input = sys.stdin.readline
#import numpy as n



def main():

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

    print(ans)





def __starting_point():
    main()

__starting_point()

def main(N):
    x = 0
    for a in range(1, N+1):
        b=N//a
        x += a*b*(b+1)//2
    return x
 
N = int(input())
print(main(N))

N = int(input())

sum_num = 0
for i in range(1, N+1):
    x = N//i
    m = (x*(x+1) // 2) * i
    sum_num += m

print(sum_num)

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

n = int(input())

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

n = int(input())
ans = 0

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



n = int(input())
ans = 0
x = n // 2
for i in range(1, n + 1):
    m = n // i
    ans += i * ((m + 1) * m) // 2
print(ans)


def solve(string):
    n = int(string)
    return str(sum(i * (n // i) * (n // i + 1) // 2 for i in range(1, n + 1)))


def __starting_point():
    import sys
    print((solve(sys.stdin.read().strip())))

__starting_point()

n = int(input())

ans = 0
s = 1
for a in range(1, int(n ** .5) + 1):
    div = n // a
    ans += ((div + 1) * div // 2 - s) * a * 2 + a * a
    s += a + 1

print(ans)



"""
def factorization(n):
    if (n == 1 ):
        return [1]
    arr = []
    temp = n

    
    for i in range(2, int(-(-n**0.5//1))+1) :
        if ( temp % i == 0):
            cnt = 0
            while (temp % i == 0):
                cnt +=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return [arr[1]+1 for arr in arr ]

#print(factorization(N))

sum_ans = 0
def cal(list):
    ans = 1
    for i in list:
        ans *= i

    return ans


for i in range(1,N+1):
    #print(factorization(i),i)
    sum_ans += i * cal(factorization(i))
    #lenが掛け算

print(sum_ans)
"""
n=int(input())
ans=0
for i in range(1,n+1):
    d=n//i
    ans+=i*d*(d+1)//2
print(ans)



import sys
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''


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

N = int(input())

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


from numba import njit, i8


@njit(i8(i8))
def solve(N):
    ans = 0
    for i in range(1, N + 1):
        j = N // i
        ans += j * (j + 1) // 2 * i
    return ans


N = int(input())
print((solve(N)))


import numpy as np
from numba import njit

@njit
def main(N):
    spf = np.zeros(N+1,np.int32)
    prime = np.zeros(N+1,np.int32)
    index = 0
    for i in range(2,N+1):
        if not spf[i]:
            spf[i] = i
            prime[index] = i
            index += 1
        for j in range(index):
            if prime[j] > i or i*prime[j] > N:
                break
            spf[i*prime[j]] = prime[j]
    ans = 0
    for k in range(1,N+1):
        n = k
        before = spf[n]
        count = 0
        fk = 1
        while n > 1:
            if spf[n] == before:
                count += 1
                n //= spf[n]
            else:
                fk *= (count+1)
                before = spf[n]
                count = 1
                n //= spf[n]
        fk *= (count+1)
        ans += k*fk
    print(ans)
    
N = int(input())
main(N)

import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numba
def main():
    @numba.njit
    def solve(n):
        r = 0
        for i1 in range(1, n + 1):
            y = n // i1
            r += y * (y + 1) // 2 * i1
        return r
    no = int(input())
    print(solve(no))


def __starting_point():
    main()
__starting_point()

import math
import sys
import os
from operator import mul
import numpy as np
# import sympy

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")

N = I()
ans = 0

# 足し方の見方を変える。等差数列の和をKまで足す
# 1 + 2 + 3 + 4 +...
#   + 2     + 4 +...
for i in range(1,N+1):
    # Nを超えない整数
    y = N//i
    sum = y*(y+1)*i/2
    ans += sum

print(int(ans))





# 素数 エラトステネス
def seachPrimeNum(N):
   max = int(np.sqrt(N))
   seachList = [i for i in range(2,N+1)]
   primeNum = []
   while seachList[0] <= max:
       primeNum.append(seachList[0])
       tmp = seachList[0]
       seachList = [i for i in seachList if i % tmp != 0]
   primeNum.extend(seachList)
   return primeNum

# 約数
def divisor_count(n):
    divisors = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors += 1
            if i != n // i:
                divisors += 1

    return divisors

n=int(input())

ans=0
for j in range(1,n+1): # 割る数
	a=j #初項
	d=n//j #項数
	tmp=(a+(a*d))*d//2
	ans+=tmp
	
print(ans)

n = int(input())
count = 0
for i in range(1,n+1):
    count += i * (n//i)*((n//i)+1)/2
print(int(count))

n = int(input())
ans = 0
for a in range(1, n + 1):
    num = n // a
    ans += num * (num + 1) // 2 * a
print(ans)

import numba

@numba.njit
def main(N):
    x = 0
    for i in range(1,N+1):
        for j in range(i,N+1,i):
            x += j
    return x
N = int(input())
print(main(N))

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


n=int(input())
ans=0
for i in range(1,n+1):
    val=n//i
    ans+=i*(val)*(val+1)/2
    # print(ans)
print(int(ans))

n=int(input())
print(sum(i*(n//i*(n//i+1))//2 for i in range(1,n+1)))

from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
ans = 0
for x in range(1, n+1):
    y = n // x
    ans += y * (y + 1) * x // 2
print(ans) 

def main():
    n = int(input())
    ans = 0
    for k in range(1,n+1):
        ans += k * (n//k) * (n//k+1) //2
    print(ans)

def __starting_point():
    main()

__starting_point()

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

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

def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        tmp = n//i
        ans += i*tmp*(tmp+1)//2
    print(ans)
    return


def __starting_point():
    main()

__starting_point()

def main():
    N = int(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)


def __starting_point():
    main()

__starting_point()

def solve():
    N = int(input())
    ans = 0
    for k in range(1, N+1):
        x = N // k
        ans += x * (k + x*k) // 2
    print(ans)

def __starting_point():
    solve()
__starting_point()

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


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

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

import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return list(map(int,input().split()))
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

N = k()
count = 0
for i in range(1,N+1):
    t = N//i
    count += i * t*(t+1)/2
print((int(count)))


N = int(input())
ans = 0

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

    cnt = N // i
    ans += (cnt * (cnt + 1) * i // 2) 

print(ans)


import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n = int(input())
    if n == 1:
        print(1)
        return
    r = 0
    for i1 in range(1, n + 1):
        y = n // i1
        r += y * (y + 1) // 2 * i1
    print(r)


def __starting_point():
    main()
__starting_point()

N = int(input())

ans = 0

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

print(ans)



N = int(input())
print(sum(N//n*(N//n+1)*n//2 for n in range(1,1+N)))

N=int(input())
if N==1:
    print((1))
    return
def divisor(n):
    m=N//n
    return n*m*(m+1)//2
M=N//2
ans=0
for i in range(2,M+1):
    ans+=divisor(i)
ans+=N*(N+1)-M*(M+1)//2
print(ans)







    









        

    









    

        




    















    



    





    






        






    
















        


























            
    


    


    
    














    


    














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


def __starting_point():
    main()

__starting_point()

N = int(input())
count = 0
for i in range(1,N+1):
    M = N//i
    count += i*(M*(M+1)//2)
print(count)

N = int(input())
suma = 0
for i in range(1,N+1):
  a = N // i
  suma += i * (a*(a+1)) // 2
print(suma)

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

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

n = int(input())

tmp = 0
res = 0

for i in range(1, n + 1):
    tmp = n // i
    res += tmp * (tmp + 1) * i // 2

print(res)


def main():
    n = int(input())
    ans = 0
    x = n // 2
    for i in range(1, n + 1):
        m = n // i
        ans += i * ((m + 1) * m) // 2
    print(ans)


def __starting_point():
    main()

__starting_point()

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

N = int(input())

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

print(ans)

N=int(input())
ans = 0
 
for i in range(1, N+1):
    num = N // i
    if num == 1:
        ans += i
    else:
        ans += num * (i + num * i) / 2
 
print(int(ans))

def main():
    N=int(input())
    ans=0
    for i in range(1,N+1):
        m=N//i
        ans+=i*m*(m+1)//2
        #print(i,N//i,m)
    print(ans)

def __starting_point():
    main()
__starting_point()

# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np
# import heapq
# from collections import deque
# import sympy

N = int(input())
# S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]
# S = input()

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

# def factorization(n):
#     arr = []
#     temp = n
#     for i in range(2, int(-(-n**0.5//1))+1):
#         if temp%i==0:
#             cnt=0
#             while temp%i==0:
#                 cnt+=1
#                 temp //= i
#             arr.append([i, cnt])
#     if temp!=1:
#         arr.append([temp, 1])
#     if arr==[]:
#         arr.append([n, 1])
#     return arr

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


n=int(input())
f=[0]*(n+1)
ans=0
dic={}
for i in range(1,n+1):
  j=n//i
  dic[j]=dic.get(j,0)+i
for key,value in dic.items():
  ans+=value*key*(key+1)//2
print(ans)

'''
Created on 2020/08/23

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N=int(pin())
  ans=0
  for i in range(1,N+1):
    ans+=((N//i)*(N//i+1)*i)//2
  print(ans)
  return
main()
#間に合わなそう


N = int(input())
count = 0
for i in range(1,N+1):
    t = N//i
    count += i * t*(t+1)/2
print(int(count))

import sys
import numba

@numba.njit
def main(N):
    x = 0
    for a in range(1, N+1):
        b=N//a
        x += a*b*(b+1)//2
    return x
 
N = int(input())
print(main(N))

import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        ans += i*(1 + n//i)*(n//i)//2
    print(ans)



def __starting_point():
    main()
__starting_point()

N = int(input())

ans = 0

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

#解説を参考にした
N=int(input())
ans=0 #i=1
import math
for i in range(1,N+1):
    max_i_multi=N//i
    ans+=(max_i_multi*(max_i_multi+1)*i)//2
print(ans)        

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

n = int(input())

ans = n * (n + 1) - 1
i = 2
while i * i <= n:
    m = n // i
    ans += i * (m * m - i * i + m)
    i += 1
print(ans)


n = int(input())

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

N=int(input())

ans=0

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

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


n=int(input())

#L=[n//i*(i+n//i*i)//2 for i in range(1,n+1)]
#print(sum(L))
ans=0
#for i in range(1,n+1):
#    for j in range(1,n+1):
#        if i%j==0:
#            ans+=i
#print(ans)
g=lambda x:(x*(n//x)*(n//x+1))//2
print((sum(g(i) for i in range(1,n+1))))


import numba
@numba.njit
def main(N):
    x = 0
    for a in range(1, N+1):
        b=N//a
        x += a*b*(b+1)//2
    return x
N = int(input())
print(main(N))

import sys
N=int(sys.stdin.readline())
# ans=sum((N//x)*(N//x+1)*x//2 for x in range(1,N+1))
ans=0
for x in range(1,N+1):
    y=N//x
    ans+=y*(y+1)*x//2
print(ans)


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

from numba import njit, i8


@njit(i8(i8))
def solve(N):
    ans = 0
    for i in range(1, N + 1):
        for j in range(i, N + 1, i):
            ans += j
    return ans


N = int(input())
print((solve(N)))