long a,i;main(){for(scanf("%ld",&a);++i*i<=a;)a%(i*i)||(a/=i*i,i--);a=!printf("%ld",a);}