#include #define INF 1000000001LL #define MOD 1000000007LL #define long long long #define all(x) x.begin(),x.end() using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); string s; cin >> s; if(s == "1" || s == "2" || s == "4") { cout << -1 << endl; return 0; } s = "0"+s; string t; t.push_back(s[s.size()-2]); t.push_back(s[s.size()-1]); int p = stoi(t); if(p%2 || p%4 == 0) cout << 1 << endl; else cout <<-1 << endl; return 0; }