#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;ibool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b=0){ pf[i][j]=(pf[i-1][j]+pf[i][j-i])%mod; } else{ pf[i][j]=pf[i-1][j]; } } } } int main(){ ll n,k; cin>>n>>k; ll ans=0; for(ll i=2;i<=k;i++){ if(k%i) continue; ll num=k/i; if(i>2*n||num>2*n) continue; ll t1,t2; if(i<=n+1){ t1=i-1; } else{ t1=i-1-(i-1-n)*2; } if(num<=n+1){ t2=num-1; } else{ t2=num-1-(num-1-n)*2; } if(t1%2==0&&t2%2==0) ans+=t1*t2; else if (t1%2==1&&t2%2==0){ ans+=4*((t1/2)*(t2/2)); ans+=t2; } else if(t1%2==0&&t2%2==1){ ans+=4*((t1/2)*(t2/2)); ans+=t1; } else{ ans+=4*((t1/2)*(t2/2)); ans+=t1+t2; } } cout<