#將數字翻轉
try:
while(True):
the_first_is_zero = 0
Number = input()
temp_arr = ['0']*100 #列表初始化
for i in range(len(Number)): #換數字(頭尾調換)
temp_arr[i] = Number[len(Number)-i-1]
for j in range(len(Number)): #當頭是0時不能印出來
if(temp_arr[j] == '0' and the_first_is_zero == 0):
the_first_is_zero = 0
continue
else:
the_first_is_zero = 1
print(temp_arr[j],end="")
if(the_first_is_zero == 0): #每一個元素都是0的話,只印出一個0
print(0,end="")
print("")
except EOFError:
pass