LearnPy Hub
← Arena
IntermediateRating 1300

Goldbach Ways

Count the ways to write the even number n as p + q with primes p ≤ q.

Input

One even integer n (4 ≤ n ≤ 10⁶).

Output

One integer.

Sample 1

Input
4
Output
1

Sample 2

Input
10
Output
2
solution.py
Output appears here
Goldbach Ways · Python Arena problem · LearnPy Hub