loop{p (1+8*read_line.to_i 2)**0.5%1>0?0:1}