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

April Fools Day Contest 2020:

- UnknownX

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only 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

D. Again?

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputInput

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

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/06/2020 11:56:33 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|