#include <stdio.h> int rever(int n) { int m = 0; int t = 0; while (n != 0) { t = abs(n % 10); m = m * 10 + t; n /= 10; } return m; } int main() { int a, b; scanf("%d", &a); b=rever(a); printf("%d",a+b); return 0; }