#!/usr/bin/env python3

# input

import sys



read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

n = int(eval(input()))

ans = n * (n + 1) - 1  # 1とk 自信



i = 2

while i * i <= n:

    num = n // i

    min_i = i * i

    max_i = i * num

    ans += (num - i + 1) * (min_i + max_i)  # 自分自身

    ans -= min_i

    i += 1

print(ans)

#!/usr/bin/env python3

# input



n = int(eval(input()))

ans = n * (n + 1) - 1  # 1とk 自信



i = 2

while i * i <= n:

    num = n // i

    min_i = i * i

    max_i = i * num

    ans += (num - i + 1) * (min_i + max_i)  # 自分自身

    ans -= min_i

    i += 1

print(ans)

#!/usr/bin/env python3
# input
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(eval(input()))
ans = n * (n + 1) - 1  # 1とk 自信
i = 2
while i * i <= n:
    num = n // i
    min_i = i * i
    max_i = i * num
    ans += (num - i + 1) * (min_i + max_i)  # 自分自身
    ans -= min_i
    i += 1
print(ans)

#!/usr/bin/env python3
# input
n = int(eval(input()))
ans = n * (n + 1) - 1  # 1とk 自信
i = 2
while i * i <= n:
    num = n // i
    min_i = i * i
    max_i = i * num
    ans += (num - i + 1) * (min_i + max_i)  # 自分自身
    ans -= min_i
    i += 1
print(ans)

-import sys - -read = sys.stdin.buffer.read -readline = sys.stdin.buffer.readline -readlines = sys.stdin.buffer.readlines