#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; const int MR=1e6+10; LL n,ans; LL sq(LL x){ LL l=0,r=2e9; while(l+1>n; for(LL p=2;p<10;p++){ for(LL a=0;ap*p-1) ans++; } } } for(LL a=0;a<10;a++){ for(LL b=0;b<10;b++){ if(a==b) continue; LL D=n*n*a*a+4*n*b+4; LL rd=sq(D); LL tmp=n*a+rd; //printf("a=%lld b=%lld D=%lld rd=%lld tmp=%lld\n",a,b,D,rd,tmp); if(tmp%2){ ans+=max(0ll,tmp/2-9); } else{ if(rd*rd==D) ans+=max(0ll,tmp/2-10); else ans+=max(0ll,tmp/2-9); } } } cout<