using System; using System.Linq; using System.Collections.Generic; class Program { static void Main(string[] args) { string s = Console.ReadLine(); s = s.Replace("hamu", "1"); s = s.Replace("ham", "0"); int a = Convert.ToInt32(s, 2) * 2; s = Convert.ToString(a); s = s.Replace("1", "hamu"); s = s.Replace("0", "ham"); Console.WriteLine(s); Console.Read(); } }