unsigned long long pow10i(int i)
{
	return i==0?1:10*pow10i(i-1);
}

int main(int argc, char** argv)
{
	long long res = argc == 2 ? pow10i(atoi(argv[1])) : 10000LL;
	long long x,y;
	long long hits=0;
	
	for (x=-res;x<res;x++)
		for (y=-res;y<res;y++)
			if (x*x+y*y < res*res)
				hits++;
 	printf("%lld\n", hits);
	return 0;
}
