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