#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n;     cin >> n;     long long int sum = n * (n - 1) / 2;     if (n == 0) {       cout << 0;       return 0;     }     if ((n % 2 == 0 && n % 4 != 0) || (n % 2 == 1 && n % 4 != 3))       cout << 1;     else       cout << 0;     return 0;   }   