#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int now = 1; long long N; cin >> N; for(long long i=2; i*i<=N; i++) if(N%i == 0){ int e = 0; while(N%i == 0) N /= i,e++; if(e == 1) now = -now; else now = 0; } if(N != 1) now = -now; cout << now << endl; }