N,K = map(int,input().split()) N_list = [int(x) for x in range(N+1)] n = N + 1 N_sum = 0 for i in range(N+1): for j in range(K): N_sum += N_list[i] print(N_sum/(n*K))