n, k = map(int, input().split())
res = 0
cnt = 0
for i in range(n+1):
    for _ in range(k):
        res += i
        cnt += 1

print(res / cnt)