from math import isqrt n,m = map(int,input().split()) l = isqrt(m); x = n*m for i in range(1,min(l,n)+1): x -= m//i*i if l