eolymp
bolt
Try our new interface for solving problems
Problems

Count primes

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 second
Memory limit 128 MiB
Input example #1
2 11
Output example #1
5
Source 2010-2011 Stage II All-Ukrainian Olympiad, Berdichev