def rev_num(num):
reved_num = 0
while num > 0:
digit = num %10
reved_num = reved_num + 10 +digit
num //= 10
return reved_num
num = int(input())
res = rev_num(num)
print(res)
ZGVmIHJldl9udW0obnVtKToKCXJldmVkX251bSA9IDAKCXdoaWxlIG51bSA+IDA6CgkJZGlnaXQgPSBudW0gJTEwCgkJcmV2ZWRfbnVtID0gcmV2ZWRfbnVtICsgMTAgK2RpZ2l0CgkJbnVtIC8vPSAxMAoJcmV0dXJuIHJldmVkX251bQoJCm51bSA9IGludChpbnB1dCgpKQoKcmVzID0gcmV2X251bShudW0pCgpwcmludChyZXMpCg==