a,b = gets.split.map(&:to_i).map{|v| v * v}.sort if a == b puts a + 1 else puts Math.sqrt(b - a) end