#include <iostream>
using namespace std;


bool son_complementaris(int x, int y, int b);


int main() {
  int x, y, b;
  while (cin >> x >> y >> b) cout << son_complementaris(x, y, b) << endl;
}
