#include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; #define fi first #define se second #define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define rep(i,n) repl(i,0,n) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<y?x:y) #define mmin(x,y) (x divisor(ll n){ vector res; for(ll i=1;i*i<=n;i++){ if(n%i==0){ res.push_back(i); if(i!=n/i)res.push_back(n/i); } } return res; } ll N,K; int main(){ cin.tie(0); ios::sync_with_stdio(false); cin>>N>>K; vector ds=divisor(K); ll res=0; rep(i,ds.size()){ ll sumac=ds[i]; ll sumbd=K/ds[i]; if(sumac>2*N)continue; if(sumbd>2*N)continue; ll cntac=min(N,sumac-1)-max(sumac-N,1LL)+1; ll cntbd=min(N,sumbd-1)-max(sumbd-N,1LL)+1; res+=cntac*cntbd; } cout<