main(){long double n;scanf("%Lf",&n);long long q=n=sqrtl(8*n+1);printf(q>1);}