N = 1<<31 S = input() if S[0] != 'x': print(S) else: S = S.replace('x', '0') num = int(S) print((1<<32) - num)