#include using namespace std; int main(){ string N; cin >> N; N = '0' + N; string S = N.substr(N.size() - 2); int d = stoi(S); if (d % 2 == 1 || d % 4 == 0){ cout << 1 << endl; } else { cout << -1 << endl; } }