#include <iostream>
using namespace std;
int sushu(int a);
int main()
{
int l, r;
int count = 0;
cin >> l >> r;
for (int j = l; j <= r; j++)
{
count += sushu(j);
}
cout << count << endl;
}
int sushu(int a)
{
int count1 = 0;
int flag = 0;
if (a == 2)
{
return a;
}
else if (a == 1)
{
return 0;
}
for (int i = 2; i < a; i++)
{
if (a % i == 0)
{
return 0;
}
else
{
flag = 1;
}
}
if (flag == 1)
{
return a;
}
return 0;
}
using namespace std;
int sushu(int a);
int main()
{
int l, r;
int count = 0;
cin >> l >> r;
for (int j = l; j <= r; j++)
{
count += sushu(j);
}
cout << count << endl;
}
int sushu(int a)
{
int count1 = 0;
int flag = 0;
if (a == 2)
{
return a;
}
else if (a == 1)
{
return 0;
}
for (int i = 2; i < a; i++)
{
if (a % i == 0)
{
return 0;
}
else
{
flag = 1;
}
}
if (flag == 1)
{
return a;
}
return 0;
}