#include using namespace std; #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const int mod=1000000007; const int INF=1001001001; int main() { string S; cin>>S; int n=S.size(); int a=S[n-1]-'0'; if(n>1){a+=10*(S[n-2]-'0');} int b=S[n-1]-'0'; if(a%4==0||b%2!=0){cout<<1<