






def    lowerCAmelCase__		(			_a				:	int = 10_00			):
		snake_case_ :							Union[str, Any]         =				[]
		snake_case_ :							str         =				[]
		snake_case_ :							List[str]         =				3
		snake_case_ :							Union[str, Any]         =				5
		snake_case_ :							Union[str, Any]         =				1
		while True:
				snake_case_ :							Any         =				z * temp
				if result < n:
						zmulti.append(_a			)
						temp += 1
				else:
						snake_case_ :							Tuple         =				1
						break
		while True:
				snake_case_ :							Tuple         =				x * temp
				if result < n:
						xmulti.append(_a			)
						temp += 1
				else:
						break
		snake_case_ :							int         =				list(set(xmulti + zmulti			)			)
		return sum(_a			)


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








from __future__ import annotations

from collections.abc import Generator

def    lowerCAmelCase__		(			_a				:	int			):
		if not isinstance(_a     ,					_a			) or n < 1:
				raise Exception("Sequence only defined for positive integers"			)

		yield n
		while n != 1:
				if n % 2 == 0:
						n //= 2
				else:
						snake_case_ :							List[str]         =				3 * n + 1
				yield n

def    lowerCAmelCase__		(			):
		snake_case_ :							Optional[int]         =				43
		snake_case_ :							Union[str, Any]         =				tuple(collatz_sequence(_a			)			)
		print(_a			)
		print(F'''Collatz sequence from {n} took {len(_a			)} steps.'''			)


if __name__ == "__main__":
							main()
