Codeforces Round 1010 (Div. 1, Unrated)
G1
Hard Formula
Codeforces
3100
原题
← FG2 →
翻译中…

This is the easy version of the problem. The difference between the versions is that in this version, the limits on $n$ and the time limit are smaller. You can hack only if you solved all versions of this problem.

翻译中…

You are given an integer $n$, and you need to compute $(\sum_{k=1}^n k\bmod\varphi(k))\bmod 2^{32}$, where $\varphi(k)$ equals the number of positive integers no greater than $k$ that are coprime with $k$.

翻译中…

Input

翻译中…

The only line contains a single integer $n$ ($1 \le n \le 10^{10})$.

翻译中…

Output

翻译中…

Print a single integer, representing $(\sum_{k=1}^n k\bmod\varphi(k))\bmod 2^{32}$.

翻译中…

样例

Input #1
5
Output #1
2
InputCopy OutputCopy
Input #2
10000000
Output #2
2316623097
InputCopy OutputCopy
Input #3
10000000000
Output #3
282084447
InputCopy OutputCopy
题目信息
题号
2081G1
时间限制
2 s
内存限制
1024 MB
标签
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。