open System let () = let n = stdin.ReadLine () let n2 = n |> (fun n -> n.Replace("hamu", "1")) |> (fun n -> n.Replace("ham", "0")) |> (fun n -> Convert.ToInt32(n, 2)) |> ( * ) 2 |> (fun n -> Convert.ToString(n, 2)) |> (fun n -> n.Replace("1", "hamu")) |> (fun n -> n.Replace("0", "ham")) printfn "%s" n2