s = int(input()) a = s//10000 b = s//1000%10 c = s//100%10 d = s//10%10 e = s%10 print(e,d,c,b,a,sep="")