n = int(input()) a = str(n//10000) #万 b = str(n//1000%10) #千 c = str(n//100%100%10) #百 d = str(n//10%10) #十 e = str(n%10) #个 print(e+d+c+b+a)