gets l=gets.split.map(&:to_i) a=l.count{|i|i%2>0} b=l.count{|i|i%2<1} p (a-b).abs