using System; using System.Collections.Generic; using System.Linq; class Magatro { static Dictionary HamDic = new Dictionary(); static string[] IntHum = { "ham", "hamu" }; static void Main() { for(int i = 0; i < 2; i++) { HamDic.Add(IntHum[i], i); } string n = Console.ReadLine(); Console.WriteLine(tohum(2 * Toint(n))); } static int Toint(string hum) { hum = hum.Replace(IntHum[1], "1"); hum = hum.Replace(IntHum[0], "0"); //return int.Parse(hum); int ret = 0; for(int i = 0; i < hum.Length; i++) { if (hum[hum.Length - 1 - i] == '1') { ret += (int)Math.Pow(2, i); } } return ret; } static string tohum(int n) { //Console.WriteLine(n); string s = Convert.ToString(n, 2); s=s.Replace("1", "hamu"); s= s.Replace("0", "ham"); // Console.WriteLine(s); return s; } }