Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

The following languages are only available languages for the problems from the contest

Unknown Language Round #2:

- Io-2008-01-07 (Win32)

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

H. Reverse It!

time limit per test

4 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputThe 14th of March was the international day of mathematics, because of number π = 3.1415926...

In the occasion of this day Goofy Nephews Unity Organization (GNU) wants to publish the fastest program in math at 1:59:26 AM.

Now the time is 1:11:11 AM and the project team haven't checked their program yet. Because of shortage of time they want to check their program with some queries. So they hired Hormizd (one of the greatest programmers in world) to write a tester for GNU's new program. Because Hormizd has much more important things to do, he wants you to write a small part of tester and it is reversing the numbers. Help him before 1:59:26.

We can reverse numbers easily. For example by reversing 1234 we get 4321.

Note, that if the integer is negative then its reverse would be also negative. For example reverse of - 123 is - 321.

Also, you have to delete all the leading zeroes before and after the reverse.

Given an integer you have to help Hormizd reverse it.

Input

The first line contains a single integer *n*. It is less than 10^{1000} by it's absolute value. This integer may have leading zeros. If it had leading zeros you should first omit them and print the reverse of remaining digits. It's guaranteed that input contains less than 10001 characters.

Output

Output a single integer, the reverse of the given number. You have to omit leading zeros in the output.

Examples

Input

23

Output

32

Input

-032

Output

-23

Input

01234560

Output

654321

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/17/2018 17:45:32 (d1).

Desktop version, switch to mobile version.

User lists

Name |
---|