#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t = 0, n, x, y, z, i, j, k, g, p, q, ans = 0, sum = 0, c = 0;
  scanf("%lld", &n);
  if (n % 2) n++;
  x = n / 2;
  if (x % 2) ans = 1;
  printf("%lld\n", ans);
  return 0;
}
