






"""simple docstring"""



import operator as op


__A		:       Union[str, Any]  				=		'''scaler.pt'''
__A		:       List[str]  				=		'''pytorch_model'''
__A		:       List[Any]  				=		'''random_states'''
__A		:       int  				=		'''optimizer'''
__A		:       List[Any]  				=		'''scheduler'''
__A		:       Tuple  				=		'''pytorch_model.bin'''
__A		:       Union[str, Any]  				=		'''pytorch_model.bin.index.json'''
__A		:       Any  				=		'''model.safetensors'''
__A		:       int  				=		'''model.safetensors.index.json'''
__A		:       Any  				=		'''1.10.2'''
__A		:       List[Any]  				=		'''py38'''
__A		:       Union[str, Any]  				=		'''4.17.0'''
__A		:       Optional[Any]  				=		['''ml.p3.16xlarge''', '''ml.p3dn.24xlarge''', '''ml.p4dn.24xlarge''']
__A		:       int  				=		['''FULL_SHARD''', '''SHARD_GRAD_OP''', '''NO_SHARD''', '''HYBRID_SHARD''', '''HYBRID_SHARD_ZERO2''']
__A		:       int  				=		['''TRANSFORMER_BASED_WRAP''', '''SIZE_BASED_WRAP''', '''NO_WRAP''']
__A		:       Tuple  				=		['''BACKWARD_PRE''', '''BACKWARD_POST''', '''NO_PREFETCH''']
__A		:       Optional[Any]  				=		['''FULL_STATE_DICT''', '''LOCAL_STATE_DICT''', '''SHARDED_STATE_DICT''']
__A		:       Optional[int]  				=		'''2.0.1'''
__A		:       Union[str, Any]  				=		['''pdsh''', '''standard''', '''openmpi''', '''mvapich''']
__A		:       Optional[Any]  				=		['''default''', '''reduce-overhead''', '''max-autotune''']

__A		:       Optional[Any]  				=		{'''>''': op.gt, '''>=''': op.ge, '''==''': op.eq, '''!=''': op.ne, '''<=''': op.le, '''<''': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
__A		:       Dict  				=		[
    '''nnodes''',
    '''nproc_per_node''',
    '''rdzv_backend''',
    '''rdzv_endpoint''',
    '''rdzv_id''',
    '''rdzv_conf''',
    '''standalone''',
    '''max_restarts''',
    '''monitor_interval''',
    '''start_method''',
    '''role''',
    '''module''',
    '''m''',
    '''no_python''',
    '''run_path''',
    '''log_dir''',
    '''r''',
    '''redirects''',
    '''t''',
    '''tee''',
    '''node_rank''',
    '''master_addr''',
    '''master_port''',
]

__A		:       List[str]  				=		['''DEEPSPEED''', '''MULTI_GPU''', '''FSDP''', '''MEGATRON_LM''']
__A		:       Optional[Any]  				=		['''DEEPSPEED''', '''MULTI_XPU''', '''FSDP''']











"""simple docstring"""



def 						lowercase    (				__snake_case				: int	):
		if n == 1 or not isinstance(__snake_case		,					__snake_case	):
				return 0
		elif n == 2:
				return 1
		else:
				lowercase_ : Dict							       =   [0, 1]
				for i in range(2		,					n + 1	):
						sequence.append(sequence[i - 1] + sequence[i - 2]	)

				return sequence[n]



def 						lowercase    (				__snake_case				: int	):
		lowercase_ : str							       =   0
		lowercase_ : List[str]							       =   2

		while digits < n:
				index += 1
				lowercase_ : Any							       =   len(str(fibonacci(__snake_case	)	)	)

		return index



def 						lowercase    (				__snake_case				: int = 1_0_0_0	):
		return fibonacci_digits_index(__snake_case	)


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



