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()

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()

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()

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) ** 0.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()

+    m = int((n + 1) ** 0.5) +    u = n // (m + 1) -    for i in range(1, n + 1): +    for i in range(1, u + 1): +    for i in range(m, 0, -1): +        v = n // i +        ans += (v * (v + 1) - u * (u + 1)) // 2 * i * (i + 1) // 2 +        u = v