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