module a;real x;initial while($fscanf(0,"%b",x))$write(1==(8*x+1)**0.5%2);endmodule