





"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		int = 10_00							)      ->				Tuple:
      __SCREAMING_SNAKE_CASE    ,__SCREAMING_SNAKE_CASE       :Dict		    =  1, 1
      __SCREAMING_SNAKE_CASE       :List[Any]		    =  2
      while True:
            __SCREAMING_SNAKE_CASE       :int		    =  0
            __SCREAMING_SNAKE_CASE       :Any		    =  fa + fa
            __SCREAMING_SNAKE_CASE    ,__SCREAMING_SNAKE_CASE       :List[str]		    =  fa, f
            index += 1
            for _ in str(snake_case_							):
                  i += 1
            if i == n:
                  break
      return index


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






"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		int = 10			,       a_					:		int = 22							)      ->				int:
      __SCREAMING_SNAKE_CASE       :Optional[int]		    =  range(1			,       a_							)
      __SCREAMING_SNAKE_CASE       :List[Any]		    =  range(1			,       a_							)
      return sum(
          1 for power in powers for base in bases if len(str(base**power							)							) == power							)


if __name__ == "__main__":
  print(f'{solution(1_0, 2_2) = }')