#include<bits/stdc++.h> using namespace std; int main(){ long csb; cin>>csb; if (csb%4==0){ cout<<1; } else { cout<<0; } }