The following languages are only available languages for the problems from the contest

VK Cup 2016 - Wild Card Round 1 (Unofficial Open Online Mirror):

- J

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

F. Primes in Interval

time limit per test

2 secondsmemory limit per test

64 megabytesinput

standard inputoutput

standard outputYou are given two integers *a* and *b* (*a* ≤ *b*). How many prime numbers are there on the interval from *a* to *b*, inclusive?

Input

The input contains two integers *a* and *b* (2 ≤ *a* ≤ *b* ≤ 1 000 000), separated by a single space.

Output

Output a single integer — the number of primes between *a* and *b*, inclusive.

Examples

Input

10 20

Output

4

Input

23 23

Output

1

Input

271 566

Output

46

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/15/2019 06:58:30 (h3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|