/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
//int n, m;
Scanner in
= new Scanner
(System.
in);
final int MAXN = 10000001;
int simple[]=new int[MAXN+1];
for(int i = 2; i <= MAXN; i++){
simple[i] = 1;
}
for(int i
= 2; i
<= Math.
sqrt(MAXN
); i
++){ if(simple[i]==1){
for(int j = i * i; j <= MAXN; j += i){
simple[j] = 0;
}
}
}
int count[]=new int[MAXN+1];
int lastSum = 0;
for(int i = 1; i < MAXN; i++){
count[i] = lastSum + simple[i];
lastSum = count[i];
}
while(in.hasNextInt()) {
int m = in.nextInt();
int n = in.nextInt();
int answer = count[n] - count[m] + simple[m];
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuQXJyYXlzOwppbXBvcnQgamF2YS51dGlsLlNjYW5uZXI7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KICB7CiAgICAvL2ludCBuLCBtOyAgCiAgICBTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKICAgIAogICAgIGZpbmFsIGludCBNQVhOID0gMTAwMDAwMDE7CiAgICAgaW50IHNpbXBsZVtdPW5ldyBpbnRbTUFYTisxXTsKICAgICBmb3IoaW50IGkgPSAyOyBpIDw9IE1BWE47IGkrKyl7CiAgICAgICAgIHNpbXBsZVtpXSA9IDE7CiAgICAgfQogICAgIGZvcihpbnQgaSA9IDI7IGkgPD0gTWF0aC5zcXJ0KE1BWE4pOyBpKyspewogICAgICAgICBpZihzaW1wbGVbaV09PTEpewogICAgICAgICAgICAgZm9yKGludCBqID0gaSAqIGk7IGogPD0gTUFYTjsgaiArPSBpKXsKICAgICAgICAgICAgICAgICBzaW1wbGVbal0gPSAwOwogICAgICAgICAgICAgfQogICAgICAgICB9CiAgICAgfQogCiAgICAgaW50IGNvdW50W109bmV3IGludFtNQVhOKzFdOwogICAgIGludCBsYXN0U3VtID0gMDsKICAgICBmb3IoaW50IGkgPSAxOyBpIDwgTUFYTjsgaSsrKXsKICAgICAgICAgY291bnRbaV0gPSBsYXN0U3VtICsgc2ltcGxlW2ldOwogICAgICAgICBsYXN0U3VtID0gY291bnRbaV07CiAgICAgfQogICAgICB3aGlsZShpbi5oYXNOZXh0SW50KCkpIHsKICAgICAgICBpbnQgbSA9IGluLm5leHRJbnQoKTsKICAgIGludCBuID0gaW4ubmV4dEludCgpOwogICAgICAgIGludCBhbnN3ZXIgPSBjb3VudFtuXSAtIGNvdW50W21dICsgc2ltcGxlW21dOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigpOwogICAgICBTeXN0ZW0ub3V0LnByaW50bG4oYW5zd2VyKTsKICAgICAgfQogIH0KfQ==