#include using namespace std; typedef long long ll; ll n,k; ll solve(ll x){ if(x>2*n) return 0; if(x<=1) return 0; if(x<=n + 1) return x - 1; return 2*n - x + 1; } int main(){ cin >> n >> k; ll ans = 0; for(ll i=1;i*i<=k;i++){ if(k%i==0){ ans += solve(i)*solve(k/i); if(i*i!=k){ ans += solve(k/i)*solve(i); } } } cout << ans << endl; }