#include #include #include #include #include #include #include #include #include using namespace std; using ll = int64_t; #define rep(i, j, n) for (int i = j; i < (int)n; ++i) #define rrep(i, j, n) for (int i = (int)n - 1; j <= i; --i) template std::ostream& operator<<(std::ostream& os, std::vector& a) { os << "{"; for (size_t i = 0; i < a.size(); ++i) os << (i > 0 ? "," : "") << a[i]; return os << "}"; } constexpr ll MOD = 1000000007; constexpr int INF = 0x3f3f3f3f; constexpr ll INFL = 0x3f3f3f3f3f3f3f3fLL; int main() { string s; cin >> s; if (s.size() > 16) cout << 1 << endl; else { ll n = atoll(s.c_str()); ll i = 1; while (i * i <= n) { if (n % i == 0) { ll c = i; ll d = n / i; if ((c + d) % 2 == 0) { cout << 1 << endl; return 0; } } i++; } } cout << -1 << endl; return 0; }