codeforces#P784E. Twisted Circuit

    ID: 28440 远端评测题 2000ms 64MiB 尝试: 1 已通过: 1 难度: 7 上传者: 标签>*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.

Samples

0
1
1
0

0