
"""simple docstring"""




from math import sqrt



def        _lowerCamelCase ( __a    ):
		SCREAMING_SNAKE_CASE_						 = 0
		for i in range(1,							int(sqrt(__a    ) + 1    )    ):
				if n % i == 0 and i != sqrt(__a    ):
						total += i + n // i
				elif i == sqrt(__a    ):
						total += i
		return total - n



def        _lowerCamelCase ( __a = 10_000    ):
		SCREAMING_SNAKE_CASE_						 = sum(
		    i
		    for i in range(1,							__a    )
		    if sum_of_divisors(sum_of_divisors(__a    )    ) == i and sum_of_divisors(__a    ) != i    )
		return total


if __name__ == "__main__":
						print(solution(int(str(input()).strip())))

"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter



def        _lowerCamelCase ( __a    ):
		SCREAMING_SNAKE_CASE_						 = Counter()
		for base in range(1,							max_perimeter + 1    ):
				for perpendicular in range(__a,							max_perimeter + 1    ):
						SCREAMING_SNAKE_CASE_						 = (base * base + perpendicular * perpendicular) ** 0.5
						if hypotenuse == int(__a    ):
								SCREAMING_SNAKE_CASE_						 = int(base + perpendicular + hypotenuse    )
								if perimeter > max_perimeter:
										continue
								triplets[perimeter] += 1
		return triplets



def        _lowerCamelCase ( __a = 1_000    ):
		SCREAMING_SNAKE_CASE_						 = pythagorean_triple(__a    )
		return triplets.most_common(1    )[0][0]


if __name__ == "__main__":
						print(f'''Perimeter {solution()} has maximum solutions''')