using System.Linq; using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); Console.WriteLine(getAns(a,b)); } public static double getAns (int a, int b) { var ans = new double[2]; ans[0] = ans[1] = 1000000; if (b > a) return getAns(b, a); var w = Math.Sqrt(a * a + b * b); if (check(a, b, w)) ans[0] = w; var w2 = Math.Sqrt(a * a - b * b); if (check(a, b, w2)) ans[1] = w2; return ans.Min(); } public static bool check (int a, int b, double c) { var a2 = (double)a; var b2 = (double)b; if (a2 + b2 <= c) return false; if (a2 + c <= b2) return false; if (b2 + c <= a2) return false; return true; } }