#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  cin >> n;
  n = n % 4;
  if (n == 0 || n == 3)
    cout << "0" << endl;
  else if (n == 1)
    cout << "1" << endl;
  else if (n == 2)
    cout << "1" << endl;
}
