Welcome to ZOJ
Information
Problems
Runs
Statistics
Ranklist
Clarification
72 - ZOJ Monthly, November 2008 - B
Beans Game

Time Limit: 5 Seconds      Memory Limit: 32768 KB

There are three piles of beans. TT and DD pick any number of beans from any pile or the same number from any two piles by turns. Who get the last bean will win. TT and DD are very clever.

Input

Each test case contains of a single line containing 3 integers a b c, indicating the numbers of beans of these piles. It is assumed that 0 <= a,b,c <= 300 and a + b + c > 0.

Output

For each test case, output 1 if TT will win, ouput 0 if DD will win.

Sample Input

1 0 0
1 1 1
2 3 6

Sample Output

1
0
0

Author: JIANG, Guangran
Submit    Status