#P784E. Twisted Circuit

    ID: 3828 Type: RemoteJudge 2000ms 64MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>*special problembrute forceimplementation*2000

Twisted Circuit

No submission language available for this problem.

Description

The input consists of four lines, each line containing a single digit 0 or 1.

Output a single digit, 0 or 1.

Input

The input consists of four lines, each line containing a single digit 0 or 1.

Output

Output a single digit, 0 or 1.

Samples

0
1
1
0

0