



'''simple docstring'''




from __future__ import annotations


def 				lowerCAmelCase_   (	_lowerCamelCase:   list[int]					):
		if not nums:
				return 0
		__SCREAMING_SNAKE_CASE       :		Optional[int]           =		nums[0]
		__SCREAMING_SNAKE_CASE       :		Union[str, Any]           =		0
		for num in nums[1:]:
				__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       :		Any           =		(
				    max_excluding + num,
				    max(_lowerCamelCase       ,      _lowerCamelCase					),
				)
		return max(_lowerCamelCase       ,      _lowerCamelCase					)


if __name__ == "__main__":
						import doctest

						doctest.testmod()




'''simple docstring'''




def 				lowerCAmelCase_   (	_lowerCamelCase:   int					):
		__SCREAMING_SNAKE_CASE       :		str           =		int(_lowerCamelCase					)
		if n_element < 1:
				__SCREAMING_SNAKE_CASE       :		List[str]           =		ValueError("""a should be a positive number"""					)
				raise my_error

		__SCREAMING_SNAKE_CASE       :		List[Any]           =		[1]
		__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       :		Optional[int]           =		(0, 0, 0)
		__SCREAMING_SNAKE_CASE       :		List[str]           =		1
		while index < n_element:
				while hamming_list[i] * 2 <= hamming_list[-1]:
						i += 1
				while hamming_list[j] * 3 <= hamming_list[-1]:
						j += 1
				while hamming_list[k] * 5 <= hamming_list[-1]:
						k += 1
				hamming_list.append(
				    min(hamming_list[i] * 2       ,      hamming_list[j] * 3       ,      hamming_list[k] * 5					)					)
				index += 1
		return hamming_list


if __name__ == "__main__":
						UpperCamelCase__       :	Optional[Any]    = input('''Enter the last number (nth term) of the Hamming Number Series: ''')
						print('''Formula of Hamming Number Series => 2^i * 3^j * 5^k''')
						UpperCamelCase__       :	List[str]    = hamming(int(n))
						print('''-----------------------------------------------------''')
						print(f"The list with nth numbers is: {hamming_numbers}")
						print('''-----------------------------------------------------''')