#include<stdio.h> #include<string.h> const int LIMIT=1000000; int count[LIMIT+1]; int main(){ memset(count,0,sizeof(count)); for(__int64 i=3;;i++){ if(4*i-4>LIMIT)break; for(__int64 j=i-2;j>=1;j-=2){ if(i*i-j*j>LIMIT)break; count[(int)(i*i-j*j)]++; } } int ans=0; for(int i=3;i<=LIMIT;i++){ if(1<=count[i]&&count[i]<=10)ans++; } printf("%d\n",ans); }