#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define llint long long #define inf 1e18 #define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++) #define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++) #define chmin(x, y) (x) = min((x), (y)) #define chmax(x, y) (x) = max((x), (y)) using namespace std; typedef pair P; string s; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> s; if(s.size() > 2) s = s.substr(s.size()-2); if(s == "1"){ cout << -1 << endl; return 0; } llint x = atoi(s.c_str()); if(x % 2 || x % 4 == 0) cout << 1 << endl; else cout << -1 << endl; return 0; }