def main(): F = [0]*(10**7+1) for x in range(3200): for y in range(3200): r = x**2+y**2 if 0 <= r <= 10**7: if x == 0 and y == 0: F[r] += 1 elif x == 0 or y == 0: F[r] += 2 else: F[r] += 4 x, y = map(int, input().split()) ans = 0 for i in range(x, y+1): ans = max(F[i], ans) print(ans) if __name__ == '__main__': main()