





import os
import zipfile

import requests
from get_ci_error_statistics import download_artifact, get_artifacts_links







def 					_SCREAMING_SNAKE_CASE							(  a   ,		a=7    ) -> Union[str, Any]:
					__A      :		Any         =							None
					if token is not None:
										__A      :		Union[str, Any]         =							{'Accept': 'application/vnd.github+json', 'Authorization': F"""Bearer {token}"""}

					# The id of a workflow (not of a workflow run)
					__A      :		Tuple         =							'636036'

					__A      :		List[Any]         =							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}"""

					__A      :		Optional[int]         =							requests.get(__snake_case   ,		headers=__snake_case    ).json()

					return result["workflow_runs"]







def 					_SCREAMING_SNAKE_CASE							(  a    ) -> Union[str, Any]:
					__A      :		List[Any]         =							get_daily_ci_runs(__snake_case    )
					__A      :		Tuple         =							None
					for workflow_run in workflow_runs:
										if workflow_run["status"] == "completed":
															__A      :		str         =							workflow_run['id']
															break

					return workflow_run_id







def 					_SCREAMING_SNAKE_CASE							(  a   ,		a   ,		a    ) -> Tuple:
					__A      :		Optional[Any]         =							get_last_daily_ci_runs(__snake_case    )
					if workflow_run_id is not None:
										__A      :		Any         =							get_artifacts_links(worflow_run_id=__snake_case   ,		token=__snake_case    )
										for artifact_name in artifact_names:
															if artifact_name in artifacts_links:
																				__A      :		Tuple         =							artifacts_links[artifact_name]
																				download_artifact(
																				    artifact_name=__snake_case   ,		artifact_url=__snake_case   ,		output_dir=__snake_case   ,		token=__snake_case    )







def 					_SCREAMING_SNAKE_CASE							(  a   ,		a   ,		a    ) -> Optional[int]:
					get_last_daily_ci_artifacts(__snake_case   ,		__snake_case   ,		__snake_case    )

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

					return results





'''simple docstring'''






from __future__ import annotations





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			int | str				):
     _A    		=  str(__snake_case				)
     return n == n[::-1]





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			int = 1_0_0_0_0_0_0				):
     _A    		=  0

     for i in range(1   ,		__snake_case				):
          if is_palindrome(__snake_case				) and is_palindrome(bin(__snake_case				).split('b'				)[1]				):
               total += i
     return total


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



