#include <bits/stdc++.h>
using namespace std;
void test_case() {
  int n;
  cin >> n;
  if (n % 4 == 0 || n % 4 == 3)
    cout << 0 << "\n";
  else
    cout << 1 << "\n";
}
int main() {
  int tc = 1;
  while (tc--) {
    test_case();
  }
  return 0;
}
