using System; using System.Collections.Generic; using System.Linq; class Program { static int ReadInt() { return int.Parse(Console.ReadLine()); } static int[] ReadInts() { return Console.ReadLine().Split().Select(int.Parse).ToArray(); } static string[] ReadStrings() { return Console.ReadLine().Split(); } static double Calc(int a, int b) { if (a > b) return Calc(b, a); var x = Math.Sqrt(a * a + b * b); if (a < b) { var y = Math.Sqrt(b * b - a * a); return Math.Min(x, y); } return x; } static void Main() { var ab = ReadInts(); int a = ab[0], b = ab[1]; Console.WriteLine(Calc(a, b)); } }