#include<stdio.h>
int main()
{
int i, j, m, flag, count=0;
for (i=2; i<=350000; i++)
{
flag= 1;
m=i/2;
for (j=2; j<=m; j++)
{
if (i%j==0)
{
flag=0;
break;
}
}
if (flag==1)
count++;
}
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KCmludCBtYWluKCkKewoJaW50IGksIGosIG0sIGZsYWcsIGNvdW50PTA7CgkKCWZvciAoaT0yOyBpPD0zNTAwMDA7IGkrKykKCXsKCQlmbGFnPSAxOwoJCW09aS8yOwoJCWZvciAoaj0yOyBqPD1tOyBqKyspCgkJewoJCQlpZiAoaSVqPT0wKQoJCQl7CgkJCQlmbGFnPTA7CgkJCQlicmVhazsKCQkJfQoJCX0KCQkKCQlpZiAoZmxhZz09MSkKCQljb3VudCsrOwoJfQoJCglwcmludGYoIiVkIiwgY291bnQpOwoJCglyZXR1cm4gMDsKfQ==