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