favorite We need a little bit of your help to keep things running, click on this banner to learn more

The favorite numbers of Santa Claus

The favorite numbers of Santa Claus

prb33 Santa Claus liked play with numbers and figures. Most of all he liked a number 1 because 1.01 New Year starts.

Years passed, but he stayed be of superstitious - he didn't like numbers, where 3 stand after 1, that is number 13. On New Year he decided to give a new problem: count how many Santa Claus favorite prime numbers contains the interval [a, b]?


Contains two numbers: the start a and the end b of the interval (1ab500000).


Print the amount of favorite prime numbers of Santa Claus.

Time limit 1 second
Memory limit 128 MiB
Input example #1
9 23
Output example #1