#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; #define int long long signed main(){ int N; cin>>N; int ans = 0; for(int i=1;i 1){ int mid = (l+r)/2; if(i*i+mid*mid <= N*N) l = mid; else r = mid; } if(i*i+l*l == N*N) ans++; } cout<