#include using namespace std; using ll = long long; int main(){ string s; cin >> s; int n = s.size(); int m = s[n-2]*10+s[n-1]; if(stoi(s)==4){ cout << -1 << endl; return 0; } if(m%2==0 && m%4!=0){ cout << -1 << endl; return 0; }else{ cout << 1 << endl; return 0; } }