#include <bits/stdc++.h>
using namespace std;
int main() {
    string N;
    cin >> N;
    if(N == "1" || N == "4") {
        cout << -1 << endl;
        return 0;
    }
    int n = 0;
    if(N.size() == 1) {
        n = stoi(N);
    }
    else {
        n = stoi(N.substr((int)N.size()-2,2));
    }
    if(n%2 == 1 || n%4 == 0) {
        cout << 1 << endl;
        return 0;
    }
    cout << -1 << endl;
}