Sum of squares of prime numbers in a range

Python Medium loops

Task «Sum of squares of prime numbers in a range»

Given a natural number N. Find the sum of squares of all prime numbers from 2 to N inclusive. A prime number is a natural number greater than 1 that is divisible only by 1 and itself. Use a loop to check the primality of a number. If N is less than 2, output 0.

Input Format

Integer N (1 ≤ N ≤ 10000).

Output Format

An integer is the sum of squares of prime numbers from 2 to N.

Examples

Example 1

INPUT
3 circle 5 rectangle 4 6 circle 3.5
OUTPUT
13

Example 2

INPUT
2
OUTPUT
4

Example 3

INPUT
1 rectangle 10 2
OUTPUT
0
main.py