using static System.Math; using System; public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); var ans = 0; for (int i = a; i <= b; i++) ans = Max(ans, getAns(i)); Console.WriteLine(ans); } static int getAns(int r) { var count = 0; for (int i = 0; i * i <= r; i++) for (int j = i + 1; j * j <= r; j++) if (i * i + j * j == r) if (i == 0 | j == 0) count += 4; else count += 8; return count; } }