




"""simple docstring"""





def        _UpperCamelCase     (      UpperCamelCase				)      ->      str:


			"""simple docstring"""
			__UpperCAmelCase						:			List[str]												=       ""
			for ch in key:
						if ch == " " or ch not in key_no_dups and ch.isalpha():
									key_no_dups += ch
			return key_no_dups

def        _UpperCamelCase     (      UpperCamelCase				)      ->      dict[str, str]:


			"""simple docstring"""
			__UpperCAmelCase						:			int												=       [chr(i + 65				) for i in range(26				)]
			# Remove duplicate characters from key
			__UpperCAmelCase						:			List[Any]												=       remove_duplicates(key.upper()				)
			__UpperCAmelCase						:			Dict												=       len(UpperCamelCase				)
			# First fill cipher with key characters
			__UpperCAmelCase						:			int												=       {alphabet[i]: char for i, char in enumerate(UpperCamelCase				)}
			# Then map remaining characters in alphabet to
			# the alphabet from the beginning
			for i in range(len(UpperCamelCase				)					,							26				):
						__UpperCAmelCase						:			Optional[Any]												=       alphabet[i - offset]
						# Ensure we are not mapping letters to letters previously mapped
						while char in key:
									offset -= 1
									__UpperCAmelCase						:			List[Any]												=       alphabet[i - offset]
						__UpperCAmelCase						:			Optional[Any]												=       char
			return cipher_alphabet

def        _UpperCamelCase     (      UpperCamelCase					,							UpperCamelCase				)      ->      str:


			"""simple docstring"""
			return "".join(cipher_map.get(UpperCamelCase					,							UpperCamelCase				) for ch in message.upper()				)

def        _UpperCamelCase     (      UpperCamelCase					,							UpperCamelCase				)      ->      str:


			"""simple docstring"""
			__UpperCAmelCase						:			str												=       {v: k for k, v in cipher_map.items()}
			return "".join(rev_cipher_map.get(UpperCamelCase					,							UpperCamelCase				) for ch in message.upper()				)

def        _UpperCamelCase     (      )      ->      None:


			"""simple docstring"""
			__UpperCAmelCase						:			Any												=       input("Enter message to encode or decode: "				).strip()
			__UpperCAmelCase						:			str												=       input("Enter keyword: "				).strip()
			__UpperCAmelCase						:			Optional[Any]												=       input("Encipher or decipher? E/D:"				).strip()[0].lower()
			try:
						__UpperCAmelCase						:			List[str]												=       {"e": encipher, "d": decipher}[option]
			except KeyError:
						raise KeyError("invalid input option"				)
			__UpperCAmelCase						:			Dict												=       create_cipher_map(UpperCamelCase				)
			print(func(UpperCamelCase					,							UpperCamelCase				)				)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					main()








'''simple docstring'''






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

            return sequence[n]






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE		)    ->   int:
      snake_case__       :   Optional[int]	      =    0
      snake_case__       :   Dict	      =    2

      while digits < n:
            index += 1
            snake_case__       :   Optional[int]	      =    len(str(fibonacci(__SCREAMING_SNAKE_CASE		)		)		)

      return index






def 		UpperCamelCase__      (		__SCREAMING_SNAKE_CASE = 1000		)    ->   int:
      return fibonacci_digits_index(__SCREAMING_SNAKE_CASE		)


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