Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official.
×

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

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-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/12/2018 16:22:35 (d2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|