using System; using System.Collections.Generic; namespace lecture { class MainClass { public static void Main(string[] args) { string[] A = Console.ReadLine().Split(); int x = int.Parse(A[0]); int y = int.Parse(A[1]); // 点pまでの距離 double r = Math.Sqrt(x * x + y * y); // 直径 double d = 2 * r; // 切り上げしても同じ数だった場合は整数のはず if (Math.Ceiling(d) == d ){ d += 1; } Console.WriteLine(d); } } }