N = input() ans = len(N) - 1 if N[0] != 1: ans = -5 for i in N[1:]: if i != 3: ans = -6 break print(N[1:])