A,B=gets.split.map(&:to_i) (1..1000).each{|sum| (0..sum).each{|a| b = sum - a ap = ((200*a + sum)/(sum*2)) bp = ((200*b + sum)/(sum*2)) if ap == A && bp == B puts sum exit 0 end } }