1331_D. Again?


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
```python
value = input()

print(int(value, 16)%2)
```