#include <iostream>
using namespace std;


bool es_bufo(int n);


int main() {
  int n;
  while (cin >> n) cout << es_bufo(n) << endl;
}
