#include<iostream> using namespace std; int main() { long long int x; cin>>x; if(x%4 == 0) cout<<1; else cout<<0; return 0; }