#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair int main() { string s; cin >> s; int ans; if (s.size() == 1) { if (s[0] == '2' || s[0] == '6') ans = -1; else ans = 1; } else { int n = s.size(); int x = (s[n-2] - '0') * 10 + (s[n-1]-'0'); // 下2桁 if (x%2 || (x%4 == 0)) ans = 1; else ans = -1; } cout << ans << endl; }