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+IDA6CgkJZGlnaXQgPSBudW0gJTEwCgkJcmV2ZWRfbnVtID0gcmV2ZWRfbnVtICsgMTAgKyBkaWdpdAoJCW51bSAvLz0gMTAKCXJldHVybiByZXZlZF9udW0KCQpudW0gPSBpbnQoaW5wdXQoKSkKCnJlcyA9IHJldl9udW0obnVtKQoKcHJpbnQocmVzKQo=