import math

def count_Rectangles(radius):
    r = int(radius)
    if r <= 0:
        return 0
    total = 0
    rr = r * r
    for x in range(1, r):
        y_max = math.isqrt(rr - x * x)
        total += y_max
    return total