Skip to main content

~/algor $ cat contests/round-5/C

C. Three-digit palindrome

Problem C ICPC rules 1000 ms 64 MB

A three-digit positive integer is given. Check whether the statement is true: “ reads the same from left to right and from right to left”. For example, and are such numbers.

The symmetry of the outer digits of a three-digit number

Input

One three-digit positive integer .

Output

One integer: if the statement is true, otherwise .

Note

Examples

Input #1
121
Output #1
1
Input #2
123
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.