#P1331D. Again?

    ID: 1674 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>*special problemimplementation

Again?

No submission language available for this problem.

Description

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 a single integer.

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.

Samples

A278832
0
A089956
0
A089957
1
A144045
1