#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long n;
  cin >> n;
  if (n % 4 == 0 or n % 4 == 3)
    cout << 0 << '\n';
  else
    cout << 1 << '\n';
  return 0;
}
