#include using namespace std; int main() { string s; cin >> s; if (s == "1" || s == "4") { cout << -1 << endl; return 0; } int n = s.size(); int x = s[n-1] - '0'; if (n > 1) x += (s[n-2] - '0') * 10; cout << (x % 4 == 2 ? -1 : 1) << endl; }