






import os
import zipfile

import requests
from get_ci_error_statistics import download_artifact, get_artifacts_links




def 				A		(					lowercase__  :  Optional[Any] ,		lowercase__  :  str=7  )		-> List[str]:
	UpperCamelCase__ :List[Any]						=      None
	if token is not None:
		UpperCamelCase__ :Optional[int]						=      {"""Accept""": """application/vnd.github+json""", """Authorization""": f"""Bearer {token}"""}

	# The id of a workflow (not of a workflow run)
	UpperCamelCase__ :str						=      """636036"""

	UpperCamelCase__ :Tuple						=      f"""https://api.github.com/repos/huggingface/transformers/actions/workflows/{workflow_id}/runs"""
	# On `main` branch + event being `schedule` + not returning PRs + only `num_runs` results
	url += f"""?branch=main&event=schedule&exclude_pull_requests=true&per_page={num_runs}"""

	UpperCamelCase__ :List[str]						=      requests.get(lowercase__ ,		headers=lowercase__  ).json()

	return result["workflow_runs"]




def 				A		(					lowercase__  :  Optional[Any]  )		-> Optional[Any]:
	UpperCamelCase__ :Any						=      get_daily_ci_runs(lowercase__  )
	UpperCamelCase__ :Optional[Any]						=      None
	for workflow_run in workflow_runs:
		if workflow_run["status"] == "completed":
			UpperCamelCase__ :Tuple						=      workflow_run["""id"""]
			break

	return workflow_run_id




def 				A		(					lowercase__  :  Union[str, Any] ,		lowercase__  :  int ,		lowercase__  :  int  )		-> List[str]:
	UpperCamelCase__ :Any						=      get_last_daily_ci_runs(lowercase__  )
	if workflow_run_id is not None:
		UpperCamelCase__ :int						=      get_artifacts_links(worflow_run_id=lowercase__ ,		token=lowercase__  )
		for artifact_name in artifact_names:
			if artifact_name in artifacts_links:
				UpperCamelCase__ :int						=      artifacts_links[artifact_name]
				download_artifact(
				    artifact_name=lowercase__ ,		artifact_url=lowercase__ ,		output_dir=lowercase__ ,		token=lowercase__  )




def 				A		(					lowercase__  :  Optional[Any] ,		lowercase__  :  Optional[Any] ,		lowercase__  :  List[str]  )		-> Optional[int]:
	get_last_daily_ci_artifacts(lowercase__ ,		lowercase__ ,		lowercase__  )

	UpperCamelCase__ :str						=      {}
	for artifact_name in artifact_names:
		UpperCamelCase__ :List[Any]						=      os.path.join(lowercase__ ,		f"""{artifact_name}.zip"""  )
		if os.path.isfile(lowercase__  ):
			UpperCamelCase__ :Optional[Any]						=      {}
			with zipfile.ZipFile(lowercase__  ) as z:
				for filename in z.namelist():
					if not os.path.isdir(lowercase__  ):
						# read the file
						with z.open(lowercase__  ) as f:
							UpperCamelCase__ :str						=      f.read().decode("""UTF-8"""  )

	return results





def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	1
	for i in range(1	,      num + 1				):
		fact *= i
	return fact


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	0
	while number > 0:
		snake_case_						       =	number % 10
		sum_of_digits += last_digit
		snake_case_						       =	number // 10  # Removing the last_digit from the given number
	return sum_of_digits


def 		lowerCamelCase__       (						_A = 100				):







	'''simple docstring'''





	snake_case_						       =	factorial(_A				)
	snake_case_						       =	split_and_add(_A				)
	return result


if __name__ == "__main__":
		print(solution(int(input("Enter the Number: ").strip())))
