#include using namespace std; #define SI(v) static_cast(v.size()) int main() { string s; cin >> s; auto v = stoi(s.substr(max(0, SI(s) - 2))); cout << (s == "1" || s == "4" || v % 4 == 2 ? -1 : 1) << endl; }