#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 && s != "1") res = 1; else if (!(nn & 3) && s != "4") res = 1; cout << res << "\n"; return 0; }