#include #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; template bool chmax(T &a, const T &b) { if (a bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } int main(){ cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int x; if(s.size() <= 2){ x = stoi(s); if(x == 1 || x == 2 || x == 4){ cout << -1 << endl; exit(0); } }else{ x = stoi(s.substr(s.size() - 2, 2)); } if(x % 2 == 1){ cout << 1 << endl; }else if(x % 4 != 0){ cout << -1 << endl; }else{ cout << 1 << endl; } }