$<.map{|l|i=j=1e3 puts"#{i=(i-$.*j/=2.0).round} "<l.to_i until$.==0 puts}