include Math a, b = gets.split.map(&:to_i) ans = if a == b Math.sqrt(2) * a else Math.sqrt([a, b].max ** 2 - [a, b].min ** 2) end puts ans