let [|m; n|] = stdin.ReadLine().Split " " |> Array.map int let rec e = function | 0 -> float m | n -> let prev = e (n-1) 1./3. * prev * 2. + 1./3. * (prev + 1.) + 1./3. * 0. e n |> printfn "%f"