a, b = gets.chomp.split(" ").map!{|u| u.to_i} c = (a == b)? Math.sqrt(a**2 + b**2):Math.sqrt((a**2 - b**2).abs) puts c