e=input().split() a=int(e[0]) b=a%10 c=a//10%10 d=a//100%10 i=a//1000%10 f=a//10000 print(b,c,d,i,f,sep="")