PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000216. Tổng các phần nguyên của thương (Fraction Floor Sum)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Tổng các phần nguyên của thương (Fraction Floor Sum)

Tổng các phần nguyên của thương (Fraction Floor Sum)

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive integer NN, calculate $$F(N)=\sum_{i=1}^{N}\left\lfloor\frac Ni\right\rfloor.$$ The answer may exceed the signed 32-bit range.

Input

One line contains NN.

Output

Print F(N)F(N).

Subtasks

  • Subtask 1 (20 points): 1≤N≤1000001\le N\le 100000.

  • Subtask 2 (30 points): 1≤N≤10000000001\le N\le 1000000000.

  • Subtask 3 (50 points): 1≤N≤10000000000001\le N\le 1000000000000.

Examples

Example 1

Input

3

Output

5

Explanation

3+1+1=5.

Example 2

Input

10000000000

Output

231802823220

Explanation

Group equal quotients instead of looping 10^10 times.