#include <cstdio>
const int maxMem = (int)1e8;
int mpos = 0;
int main()
{
int *mem = new int[maxMem];
for (int i = 2; i < 100; i++)
if (i % 91 == 0)
{
for (int i = 0; i < maxMem; i += 1 << 12) // 10^8 / 4000 = 2.5 * 10^5
mem[i]++;
}
printf("%d\n", mem[0] + mem[maxMem - 1]);
return 0;
}