using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoder_98 { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); long xp = long.Parse(s[0]); long yp = long.Parse(s[1]); double p = Math.Sqrt(xp * xp + yp * yp); double q = Math.Ceiling(p); double r = q * 2; if (q == p) r++; Console.WriteLine(r); Console.ReadLine(); } } }