using System; using CompLib.Util; public class Program { public void Solve() { var sc = new Scanner(); long n = sc.NextLong(); long k = sc.NextLong(); long ans = 0; for (long ac = 1; ac * ac <= k; ac++) { if (k % ac != 0) continue; long bd = k / ac; // ac,bdを[1,N]の2数の和にする // Console.WriteLine($"{ac} {C(ac, n)} {bd} {C(bd, n)}"); ans += C(ac, n) * C(bd, n) * (ac == bd ? 1 : 2); } Console.WriteLine(ans); } long C(long sum, long n) { if (sum > 2 * n) return 0; if (sum <= n + 1) return sum - 1; return 2 * n - sum + 1; } public static void Main(string[] args) => new Program().Solve(); } namespace CompLib.Util { using System; using System.Linq; class Scanner { private string[] _line; private int _index; private const char Separator = ' '; public Scanner() { _line = new string[0]; _index = 0; } public string Next() { if (_index >= _line.Length) { string s; do { s = Console.ReadLine(); } while (s.Length == 0); _line = s.Split(Separator); _index = 0; } return _line[_index++]; } public int NextInt() => int.Parse(Next()); public long NextLong() => long.Parse(Next()); public double NextDouble() => double.Parse(Next()); public decimal NextDecimal() => decimal.Parse(Next()); public char NextChar() => Next()[0]; public char[] NextCharArray() => Next().ToCharArray(); public string[] Array() { string s = Console.ReadLine(); _line = s.Length == 0 ? new string[0] : s.Split(Separator); _index = _line.Length; return _line; } public int[] IntArray() => Array().Select(int.Parse).ToArray(); public long[] LongArray() => Array().Select(long.Parse).ToArray(); public double[] DoubleArray() => Array().Select(double.Parse).ToArray(); public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray(); } }