import strformat, strutils

var
  n = stdin.readLine
  x: int
let
  t1 = ("0b", "")
  t2 = ("1", "hamu")
  t3 = ("0", "ham")

n = n.replace("hamu", "1").replace("ham", "0")
x = n.parseBinInt.shl(1)
n = fmt"{x:#b}".multiReplace(t1, t2, t3)

echo n