loop{p 2[1-(gets.to_i(2)*8+1)**0.5%1]}