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