p01998 Prime Number
problem

One day, Sosusa, who loves prime numbers, was playing with the pair $ (p, q) $, where $ p + q $ is a prime number. Suddenly, Sosusa wondered how many of these pairs were prime numbers with $ p $ and $ q $ both less than or equal to $ N $. Find the number on your behalf.



output

Output the number of pairs. Also, output a line break at the end.

Example

Input

3


Output

2
```python
import math

N = int(input())
P = [True for x in range(N + 3)]

P[0] = False
P[1] = False

for i in range(2, int(math.sqrt(N + 3)) + 1):
    if P[i]:
        for j in range(i * 2, N + 3, i):
            P[j] = False

count = 0

for q in range(3, N + 1):
    if P[q] and P[2 + q]:
        count += 2

print(count)


```