#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include using namespace std; int main(){ string s; cin>>s; int n=s.size(); if((s[n-1]-'0')%2==1) cout<<1<1 && (10*(s[n-2]-'0')+s[n-1]-'0')%4==0) cout<<1<