import sequtils,strutils,algorithm var N = stdin.readline.parseBiggestInt K = stdin.readline.parseBiggestInt p : int64 = 1 y = newSeq[int64](0) ans : int64 = 0 while p * p <= K: if K mod p == 0: y.add(p) if p * p != K: y.add(K div p) p += 1 y.sort(cmp) var i = 0 j = y.high while j >= 0: ans += (max(0, min(N, y[i] - 1) - max(1, y[i] - N) + 1)) * (max(0, min(N, y[j] - 1) - max(1, y[j] - N) + 1)) i += 1 j -= 1 echo ans