#include using namespace std; using ll = long long; using ul = unsigned long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string n, s; cin >> n; s = n.size() > 1 ? n.substr(n.size()-2,2) : n; int nn = stoi(s); int res{ -1 }; if (nn & 1 && nn != 1) res = 1; else if (!(nn & 3) && nn != 4) res = 1; cout << res << "\n"; return 0; }