import java.io.*; import java.util.Scanner; public class Main_yukicoder864 { private static Scanner sc; private static Printer pr; private static void solve() { long n = sc.nextLong(); long k = sc.nextLong(); long ans = 0; for (int i = 1; (long)i * i <= k; i++) { if (k % i != 0) { continue; } ans += f(i, n) * f(k / i, n); if (i != k / i) { ans += f(k/ i, n) * f(i, n); } } pr.println(ans); } private static long f(long i, long n) { if (i > 2 * n) { return 0; } long tmp = Math.min(n, i - 1); long tmp1 = Math.max(1, i - tmp); return tmp - tmp1 + 1; } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } void printInts(int... a) { StringBuilder sb = new StringBuilder(32); for (int i = 0, size = a.length; i < size; i++) { if (i > 0) { sb.append(' '); } sb.append(a[i]); } println(sb); } void printLongs(long... a) { StringBuilder sb = new StringBuilder(64); for (int i = 0, size = a.length; i < size; i++) { if (i > 0) { sb.append(' '); } sb.append(a[i]); } println(sb); } void printStrings(String... a) { StringBuilder sb = new StringBuilder(32); for (int i = 0, size = a.length; i < size; i++) { if (i > 0) { sb.append(' '); } sb.append(a[i]); } println(sb); } } }