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