#P10239. [yLCPC2024] G. 系ぎて

[yLCPC2024] G. 系ぎて

Background

It is not just that I feel unwilling, what even is this chart…
——ReMiRiA
I am very happy to win the championship, but what is this chart? Will it really be included??
——yoshiki

Problem Description

Fusu really likes factoring natural numbers.

For a given positive integer nn, if n=i×j×kn = i \times j \times k, where i,j,ki, j, k are positive integers, then the triple (i,j,k)(i, j, k) is called an excellent factorization of nn.

The triple (i,j,k)(i, j, k) is ordered. For example, for $2 = 1 \times 1 \times 2 = 1 \times 2 \times 1 = 2 \times 1 \times 1$, we consider (1,1,2)(1, 1, 2), (1,2,1)(1, 2, 1), and (2,1,1)(2, 1, 1) as three different excellent factorizations.

Now, Fusu wants to ask: for n=1,2,3,,Nn = 1, 2, 3, \dots, N, what is the total number of excellent factorizations of all nn?

Formally, let f(n)f(n) be the number of excellent factorizations of nn. You need to compute i=1Nf(i)\sum_{i = 1}^N f(i).

Input Format

The input contains only one line with an integer NN (1N10101 \leq N \leq 10^{10}).

Output Format

Output one line with an integer representing the answer. Since the answer may be too large, you only need to output this value modulo 2642^{64}.

2
4
100
1471

Hint

Translated by ChatGPT 5