https://www.luogu.com.cn/problem/P1307
"""
P1307 [NOIP2011 普及组] 数字反转
https://www.luogu.com.cn/problem/P1307
"""
s=0
n=int(input())
if n<0:
print("-",end='')
n=-n
while n!=0:
s=s*10+n%10
n=n//10
print(s)