let n, k = Scanf.scanf "%d %d" @@ fun a b -> a, b let rec f n k = if n = 0 then 0 else n * k + f (n-1) k let ans = (float_of_int (f n k)) /. float_of_int ((n+1) * k) let () = print_float ans