N, K = gets.split.map(&:to_i) ans = 0 base = 0 (0..N).each do |n| ans += Rational(K * n, K * (N + 1)) end puts ans.to_f