




'''simple docstring'''

from typing import Union

import fire
import torch
from tqdm import tqdm



def 							UpperCamelCase__			(			a__			,      a__ = "cpu"			,      a__ = None      ):


						'''simple docstring'''






						_lowerCAmelCase										=torch.load(a__			,      map_location=a__      )
						for k, v in tqdm(state_dict.items()      ):
												if not isinstance(a__			,      torch.Tensor      ):
																		raise TypeError('FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin'      )
												_lowerCAmelCase										=v.half()
						if save_path is None:  # overwrite src_path
												_lowerCAmelCase										=src_path
						torch.save(a__			,      a__      )


if __name__ == "__main__":
							fire.Fire(convert)






'''simple docstring'''

def 							UpperCamelCase__			(			a__ = 1_0_0_0      ):


						'''simple docstring'''






						_lowerCAmelCase										=2**power
						_lowerCAmelCase										=0
						while n:
												_lowerCAmelCase						,				_lowerCAmelCase										=r + n % 1_0, n // 1_0
						return r


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





