D. Again?
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Input

The only line of the input contains a 7-digit hexadecimal number. The first "digit" of the number is letter A, the rest of the "digits" are decimal digits 0-9.

Output

Output a single integer.

Examples
Input
A278832
Output
0
Input
A089956
Output
0
Input
A089957
Output
1
Input
A144045
Output
1