import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # (a+c)(b+d) = K import numpy as np N,K = map(int,read().split()) x = np.arange(1, 10**6+10, dtype=np.int64) div = x[K % x == 0] div = np.union1d(div, K // div) AC = div; BD = K // div # N 以下という条件を反映させる # a + c = AC low_a = np.maximum(1,AC-N) high_a = np.minimum(N,AC-1) cnt_a = np.maximum(0,high_a - low_a + 1) low_b = np.maximum(1,BD-N) high_b = np.minimum(N,BD-1) cnt_b = np.maximum(0,high_b - low_b + 1) answer = (cnt_a * cnt_b).sum() print(answer)