class Integer def divisor_list require 'prime' return [] if self <= 0 return [1] if self == 1 prime_division.map.with_index { |(base, k), i| s = i.zero? ? 0 : 1 (s..k).map { |n| base ** n } }.inject { |res, e| res + res.flat_map { |t| e.map { |v| t * v } } }.sort - [1, self] end end N = gets.to_i K = gets.to_i ans = 0 K.divisor_list.each do |x| y = K / x a = x <= N ? x - 1 : [2 * N - x + 1, 0].max b = y <= N ? y - 1 : [2 * N - y + 1, 0].max ans += a * b end puts ans