#include #include using namespace std; using ll=long long; int main(){ ll n,k;cin>>n>>k; ll ans=0; for(ll i=1;i*i<=k;i++){ ll tmpa,tmpb; if(k%i==0){ if(i<=n)tmpa=i-1; else tmpa=max(0ll,2*n-i+1); if(k/i<=n)tmpb=k/i-1; else tmpb=max(0ll,2*n-(k/i)+1); if(tmpa==tmpb&&i==k/i)ans+=tmpa*tmpb; else ans+=2ll*tmpa*tmpb; } } cout<