public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num = input.nextInt();
int rev = 0;
while (num > 0) {
rev = rev * 10 + num % 10;
num /= 10;
}
System.out.println(rev);
}