a = int(input()) is_negative = a<0 if is_negative: a = -a res = int(str(a)[::-1]) if is_negative: res = -res print(res)