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