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