



import unicodedata
from dataclasses import dataclass
from typing import Optional, Union

import numpy as np

from transformers.data.data_collator import DataCollatorMixin
from transformers.file_utils import PaddingStrategy
from transformers.tokenization_utils_base import PreTrainedTokenizerBase







def  lowerCAmelCase_	(lowerCAmelCase__:		Union[str, Any]		,						lowerCAmelCase__:		str		,						lowerCAmelCase__:		Any		,						lowerCAmelCase__:		Dict  ):





			"""simple docstring"""


			if isinstance(lowerCAmelCase__		,						lowerCAmelCase__  ):
						UpperCAmelCase_:		Optional[Any]							      =     np.full((len(lowerCAmelCase__  ), sequence_length, 2)		,						lowerCAmelCase__  )
			else:
						UpperCAmelCase_:		str							      =     np.full((len(lowerCAmelCase__  ), sequence_length)		,						lowerCAmelCase__  )

			for i, tensor in enumerate(lowerCAmelCase__  ):
						if padding_side == "right":
									if isinstance(lowerCAmelCase__		,						lowerCAmelCase__  ):
												UpperCAmelCase_:		Union[str, Any]							      =     tensor[:sequence_length]
									else:
												UpperCAmelCase_:		List[str]							      =     tensor[:sequence_length]
						else:
									if isinstance(lowerCAmelCase__		,						lowerCAmelCase__  ):
												UpperCAmelCase_:		Union[str, Any]							      =     tensor[:sequence_length]
									else:
												UpperCAmelCase_:		Optional[Any]							      =     tensor[:sequence_length]

			return out_tensor.tolist()







def  lowerCAmelCase_	(lowerCAmelCase__:		List[str]  ):





			"""simple docstring"""


			UpperCAmelCase_:		Optional[Any]							      =     ord(lowerCAmelCase__  )
			if (cp >= 3_3 and cp <= 4_7) or (cp >= 5_8 and cp <= 6_4) or (cp >= 9_1 and cp <= 9_6) or (cp >= 1_2_3 and cp <= 1_2_6):
						return True
			UpperCAmelCase_:		List[str]							      =     unicodedata.category(lowerCAmelCase__  )
			if cat.startswith("""P"""  ):
						return True
			return False







@dataclass
class 				_a				(   _lowerCAmelCase					):
			A      		=	42
			A      		=	True
			A      		=	None
			A      		=	None
			A      		=	-100
			A      		=	"pt"

			def      __snake_case       (self,   SCREAMING_SNAKE_CASE_					)       ->   Dict:
						import torch

						UpperCAmelCase_:		List[Any]							      =     """label""" if """label""" in features[0].keys() else """labels"""
						UpperCAmelCase_:		Optional[Any]							      =     [feature[label_name] for feature in features] if label_name in features[0].keys() else None
						UpperCAmelCase_:		Optional[Any]							      =     self.tokenizer.pad(
						    SCREAMING_SNAKE_CASE_,   padding=self.padding,   max_length=self.max_length,   pad_to_multiple_of=self.pad_to_multiple_of,   return_tensors="""pt""" if labels is None else None,   )

						if labels is None:
									return batch

						UpperCAmelCase_:		Any							      =     torch.tensor(batch["""entity_ids"""]					).shape[1]
						UpperCAmelCase_:		Optional[int]							      =     self.tokenizer.padding_side
						if padding_side == "right":
									UpperCAmelCase_:		Dict							      =     [
									    list(SCREAMING_SNAKE_CASE_					) + [self.label_pad_token_id] * (sequence_length - len(SCREAMING_SNAKE_CASE_					)) for label in labels
									]
						else:
									UpperCAmelCase_:		str							      =     [
									    [self.label_pad_token_id] * (sequence_length - len(SCREAMING_SNAKE_CASE_					)) + list(SCREAMING_SNAKE_CASE_					) for label in labels
									]

						UpperCAmelCase_:		List[str]							      =     [feature["""ner_tags"""] for feature in features]
						UpperCAmelCase_:		str							      =     padding_tensor(SCREAMING_SNAKE_CASE_,   -1,   SCREAMING_SNAKE_CASE_,   SCREAMING_SNAKE_CASE_					)
						UpperCAmelCase_:		int							      =     [feature["""original_entity_spans"""] for feature in features]
						UpperCAmelCase_:		Optional[int]							      =     padding_tensor(SCREAMING_SNAKE_CASE_,   (-1, -1),   SCREAMING_SNAKE_CASE_,   SCREAMING_SNAKE_CASE_					)
						UpperCAmelCase_:		Tuple							      =     {k: torch.tensor(SCREAMING_SNAKE_CASE_,   dtype=torch.intaa					) for k, v in batch.items()}

						return batch











def  lowerCAmelCase_	(lowerCAmelCase__:		int  ):





			"""simple docstring"""


			if n == 1 or not isinstance(lowerCAmelCase__		,						lowerCAmelCase__  ):
						return 0
			elif n == 2:
						return 1
			else:
						UpperCAmelCase_:		Optional[int]							      =     [0, 1]
						for i in range(2		,						n + 1  ):
									sequence.append(sequence[i - 1] + sequence[i - 2]  )

						return sequence[n]







def  lowerCAmelCase_	(lowerCAmelCase__:		int  ):





			"""simple docstring"""


			UpperCAmelCase_:		str							      =     0
			UpperCAmelCase_:		str							      =     2

			while digits < n:
						index += 1
						UpperCAmelCase_:		Union[str, Any]							      =     len(str(fibonacci(lowerCAmelCase__  )  )  )

			return index







def  lowerCAmelCase_	(lowerCAmelCase__:		int = 1_0_0_0  ):





			"""simple docstring"""


			return fibonacci_digits_index(lowerCAmelCase__  )


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






