Problem M. 29. Prime distance
Input file name: standard input
Output file name: standard output
Time limit: 2 s
Memory limit: 1024 MB
Given an integer N, count how many pairs of integers (i, j) exist such that 1 \le i < j \le N and the distance j - i is a prime number.

Input

An integer N (1 \le N \le 10^{7}).

Output

Print the total count of such pairs (i, j).

Examples

standard inputstandard output
5 5
10 23