import scala.io.StdIn object Main { def main(args: Array[String]): Unit = { val in = StdIn.readLine().split(" ").map(_.toInt) val A = in(0) val B = in(1) println( if (A == B) math.sqrt(A * A + B * B) else math.sqrt(math.abs(A * A - B * B)) ) } }