#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 9223372036854775807;
const long long mininf = -9223372036854775807;
const long long nax = 0;
long long n, dif;
int main() {
  cin >> n;
  if (n % 2 == 0) {
    dif = n / 2;
    if (dif % 2 == 0) {
      cout << 0 << '\n';
    } else {
      cout << 1 << '\n';
    }
  } else {
    dif = n / 2;
    if (dif % 2 == 0) {
      cout << 1 << '\n';
    } else {
      cout << 0 << '\n';
    }
  }
}
