n, k = map(int, input().split()) s = n * (n + 1) // 2 all_sum = s * k print(all_sum / (n + 1) / k)