n, l = gets.split.map(&:to_i) m = l / (n - 1) f = Array.new(m + 1, false) result = 0 2.upto(m) do |i| if not f[i] i.step(m, i).each do |j| f[j] = true end result += l - i * (n - 1) + 1 end end puts result