


'''simple docstring'''






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

														return sequence[n]


def    _snake_case  (	A			)		->       int:
							lowerCAmelCase__			  =      0
							lowerCAmelCase__			  =      2

							while digits < n:
														index += 1
														lowerCAmelCase__			  =      len(str(fibonacci(A			)			)			)

							return index


def    _snake_case  (	A = 1000			)		->       int:
							return fibonacci_digits_index(A			)


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



'''simple docstring'''






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

import torch
import torch.nn as nn

from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput, apply_forward_hook
from .modeling_utils import ModelMixin
from .vae import Decoder, DecoderOutput, Encoder, VectorQuantizer




@dataclass
class 						a__							(				a__    ):





							'''simple docstring'''






							lowercase__     :  torch.FloatTensor




class 						a__							(				a__							,							a__    ):





							'''simple docstring'''






							@register_to_config
							def __init__(						self   ,       lowerCamelCase_ = 3   ,       lowerCamelCase_ = 3   ,       lowerCamelCase_ = ("DownEncoderBlock2D",)   ,       lowerCamelCase_ = ("UpDecoderBlock2D",)   ,       lowerCamelCase_ = (64,)   ,       lowerCamelCase_ = 1   ,       lowerCamelCase_ = "silu"   ,       lowerCamelCase_ = 3   ,       lowerCamelCase_ = 32   ,       lowerCamelCase_ = 2_56   ,       lowerCamelCase_ = 32   ,       lowerCamelCase_ = None   ,       lowerCamelCase_ = 0.18_215   ,       lowerCamelCase_ = "group"   ,       )			->				Union[str, Any]:
														super().__init__()

														# pass init params to Encoder
														lowerCAmelCase__			  =      Encoder(
														    in_channels=lowerCamelCase_   ,       out_channels=lowerCamelCase_   ,       down_block_types=lowerCamelCase_   ,       block_out_channels=lowerCamelCase_   ,       layers_per_block=lowerCamelCase_   ,       act_fn=lowerCamelCase_   ,       norm_num_groups=lowerCamelCase_   ,       double_z=lowerCamelCase_   ,       )

														lowerCAmelCase__			  =      vq_embed_dim if vq_embed_dim is not None else latent_channels

														lowerCAmelCase__			  =      nn.Convad(lowerCamelCase_   ,       lowerCamelCase_   ,       1  )
														lowerCAmelCase__			  =      VectorQuantizer(lowerCamelCase_   ,       lowerCamelCase_   ,       beta=0.25   ,       remap=lowerCamelCase_   ,       sane_index_shape=lowerCamelCase_  )
														lowerCAmelCase__			  =      nn.Convad(lowerCamelCase_   ,       lowerCamelCase_   ,       1  )

														# pass init params to Decoder
														lowerCAmelCase__			  =      Decoder(
														    in_channels=lowerCamelCase_   ,       out_channels=lowerCamelCase_   ,       up_block_types=lowerCamelCase_   ,       block_out_channels=lowerCamelCase_   ,       layers_per_block=lowerCamelCase_   ,       act_fn=lowerCamelCase_   ,       norm_num_groups=lowerCamelCase_   ,       norm_type=lowerCamelCase_   ,       )







							@apply_forward_hook
							def     __SCREAMING_SNAKE_CASE				(						self   ,       lowerCamelCase_   ,       lowerCamelCase_ = True  )			->				VQEncoderOutput:
														lowerCAmelCase__			  =      self.encoder(lowerCamelCase_  )
														lowerCAmelCase__			  =      self.quant_conv(lowerCamelCase_  )

														if not return_dict:
																					return (h,)

														return VQEncoderOutput(latents=lowerCamelCase_  )







							@apply_forward_hook
							def     __SCREAMING_SNAKE_CASE				(						self   ,       lowerCamelCase_   ,       lowerCamelCase_ = False   ,       lowerCamelCase_ = True  )			->				Union[DecoderOutput, torch.FloatTensor]:
														# also go through quantization layer
														if not force_not_quantize:
																					lowerCAmelCase__  ,   lowerCAmelCase__  ,   lowerCAmelCase__			  =      self.quantize(lowerCamelCase_  )
														else:
																					lowerCAmelCase__			  =      h
														lowerCAmelCase__			  =      self.post_quant_conv(lowerCamelCase_  )
														lowerCAmelCase__			  =      self.decoder(lowerCamelCase_   ,       quant if self.config.norm_type == '''spatial''' else None  )

														if not return_dict:
																					return (dec,)

														return DecoderOutput(sample=lowerCamelCase_  )







							def     __SCREAMING_SNAKE_CASE				(						self   ,       lowerCamelCase_   ,       lowerCamelCase_ = True  )			->				Union[DecoderOutput, torch.FloatTensor]:
														lowerCAmelCase__			  =      sample
														lowerCAmelCase__			  =      self.encode(lowerCamelCase_  ).latents
														lowerCAmelCase__			  =      self.decode(lowerCamelCase_  ).sample

														if not return_dict:
																					return (dec,)

														return DecoderOutput(sample=lowerCamelCase_  )