#P784E. Twisted Circuit

    ID: 6322 Type: RemoteJudge 2000ms 64MiB Tried: 0 Accepted: 0 Difficulty: 7 Uploaded By: Tags>*special problembrute forceimplementation*2000

Twisted Circuit

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.

0
1
1
0

0