#include <stdio.h> int main() { int m, reversed = 0; scanf("%d", &m); if (m < 0) { printf("error"); } else { while (m > 0) { reversed = reversed * 10 + m % 10; m /= 10; } printf("%d", reversed); } return 0; }