#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); ll n; cin >> n; map mp; int ans = 1; ll d = n; for (ll i = 2; i * i <= n; i++) { while (d % i == 0) { mp[i]++; d /= i; } } if (d != 1) mp[d]++; for (auto [x, y] : mp) { if (y == 1) { ans *= -1; } else { ans = 0; } } cout << ans << endl; return 0; }