#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.14159265359; ll inf=80010010; ll mod=1000000007; int main(){ ll n; cin >> n; if (n%2) { if (n==1) { cout << 1 << endl; return 0; } cout << 1 << endl; }else if ((n/2)%2||n==4) { cout << -1 << endl; }else{ cout << 1 << endl; } }