eolymp
Competitions

Прості числа

Count primes

Given an integer interval [l, r] (0lr2147483647, r - l106), please calculate the number of primes in the interval.

Input

Two integer l and r.

Output

Print the number of primes in the interval.

Time limit 1.5 second
Memory limit 128 MiB
Input example #1
2 11
Output example #1
5
Source 2010-2011 Stage II All-Ukrainian Olympiad, Berdichev