n = int(input()) k = int(input()) def make_divisors(n): divisors = [] for i in range(1, int(n**0.5)+1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) #divisors.sort(reverse=True) return divisors ans = 0 d = make_divisors(k) for i in d: j = k//i ans += max(0, (min(i-1, n)-max(1, i-n)+1)* (min(j-1, n)-max(1, j-n)+1)) print(ans)