


"""simple docstring"""







from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt
def _A						(						lowercase		):







    """simple docstring"""
    a 		=int(number**0.5		)
    return number == sq * sq
def _A						(						lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase		):







    """simple docstring"""
    a 		=x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
    a 		=x_den * y_den * z_den
    a 		=gcd(lowercase       ,    lowercase		)
    top //= hcf
    bottom //= hcf
    return top, bottom
def _A						(						lowercase = 35		):







    """simple docstring"""
    a 		=set()
    a 		=42
    a 		=Fraction(0		)
    a 		=42

    for x_num in range(1       ,    order + 1		):
        for x_den in range(x_num + 1       ,    order + 1		):
            for y_num in range(1       ,    order + 1		):
                for y_den in range(y_num + 1       ,    order + 1		):
                    # n=1
                    a 		=x_num * y_den + x_den * y_num
                    a 		=x_den * y_den
                    a 		=gcd(lowercase       ,    lowercase		)
                    z_num //= hcf
                    z_den //= hcf
                    if 0 < z_num < z_den <= order:
                        a 		=add_three(
                            lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase		)
                        unique_s.add(lowercase		)

                    # n=2
                    a 		=(
                        x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
                    )
                    a 		=x_den * x_den * y_den * y_den
                    if is_sq(lowercase		) and is_sq(lowercase		):
                        a 		=int(sqrt(lowercase		)		)
                        a 		=int(sqrt(lowercase		)		)
                        a 		=gcd(lowercase       ,    lowercase		)
                        z_num //= hcf
                        z_den //= hcf
                        if 0 < z_num < z_den <= order:
                            a 		=add_three(
                                lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase		)
                            unique_s.add(lowercase		)

                    # n=-1
                    a 		=x_num * y_num
                    a 		=x_den * y_num + x_num * y_den
                    a 		=gcd(lowercase       ,    lowercase		)
                    z_num //= hcf
                    z_den //= hcf
                    if 0 < z_num < z_den <= order:
                        a 		=add_three(
                            lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase		)
                        unique_s.add(lowercase		)

                    # n=2
                    a 		=x_num * x_num * y_num * y_num
                    a 		=(
                        x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
                    )
                    if is_sq(lowercase		) and is_sq(lowercase		):
                        a 		=int(sqrt(lowercase		)		)
                        a 		=int(sqrt(lowercase		)		)
                        a 		=gcd(lowercase       ,    lowercase		)
                        z_num //= hcf
                        z_den //= hcf
                        if 0 < z_num < z_den <= order:
                            a 		=add_three(
                                lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase       ,    lowercase		)
                            unique_s.add(lowercase		)

    for num, den in unique_s:
        total += Fraction(lowercase       ,    lowercase		)

    return total.denominator + total.numerator


if __name__ == "__main__":
       print(F'{solution() = }')




'''simple docstring'''




from math import ceil, sqrt


def 				lowerCAmelCase_   (	_lowerCamelCase:   int = 1_00_00_00					):
		__SCREAMING_SNAKE_CASE       :		Union[str, Any]           =		0

		for outer_width in range(3       ,      (limit // 4) + 2					):
				if outer_width**2 > limit:
						__SCREAMING_SNAKE_CASE       :		Union[str, Any]           =		max(ceil(sqrt(outer_width**2 - limit					)					)       ,      1					)
				else:
						__SCREAMING_SNAKE_CASE       :		Union[str, Any]           =		1
				if (outer_width - hole_width_lower_bound) % 2:
						hole_width_lower_bound += 1

				answer += (outer_width - hole_width_lower_bound - 2) // 2 + 1

		return answer


if __name__ == "__main__":
						print(f"{solution() = }")