#include using namespace std; using ll = long long; const ll mod = 1000000007; const int INF = 1001001001; int main(){ string s; cin >> s; int sz = s.size(); if(sz == 1){ int k = s[0] - '0'; if(k == 4 || k == 1) cout << -1 << endl; else if(k == 8 || k % 2 == 1) cout << 1 << endl; else cout << -1 << endl; } if(sz >= 2){ int k = (s[0] - '0') + 10 * (s[1] - '0'); if(k % 4 == 0 || k % 2 == 1) cout << 1 << endl; else cout << -1 << endl; } }