N, M = map(int, input().split()) diff = [M] * (N + 1) for i in range(1, M + 1): for j in range(0, N + 1, i): diff[j] -= i res = [0] * (N + 1) for x in range(N): res[x + 1] = res[x] + diff[x + 1] print(max(res))