txt = str(input())
poplist = 0
mytable = str.maketrans("1234567890", "1534267890")
answer = txt.translate(mytable)
listans = list(answer[::-1])
for i in listans:
    if i == "0":
        poplist += 1
    elif i != "0":
        break
while poplist !=0:
    listans.pop(0)
    poplist-=1
print("".join(listans))