






snake_case__      :	Optional[int]       	=      {
    """a""": """AAAAA""",
    """b""": """AAAAB""",
    """c""": """AAABA""",
    """d""": """AAABB""",
    """e""": """AABAA""",
    """f""": """AABAB""",
    """g""": """AABBA""",
    """h""": """AABBB""",
    """i""": """ABAAA""",
    """j""": """BBBAA""",
    """k""": """ABAAB""",
    """l""": """ABABA""",
    """m""": """ABABB""",
    """n""": """ABBAA""",
    """o""": """ABBAB""",
    """p""": """ABBBA""",
    """q""": """ABBBB""",
    """r""": """BAAAA""",
    """s""": """BAAAB""",
    """t""": """BAABA""",
    """u""": """BAABB""",
    """v""": """BBBAB""",
    """w""": """BABAA""",
    """x""": """BABAB""",
    """y""": """BABBA""",
    """z""": """BABBB""",
    """ """: """ """,
}


snake_case__      :	int       	=      {value: key for key, value in encode_dict.items()}






def     _snake_case    (__lowercase):
   UpperCamelCase_									=     ''
   for letter in word.lower():
      if letter.isalpha() or letter == " ":
         encoded += encode_dict[letter]
      else:
         raise Exception('encode() accepts only letters of the alphabet and spaces')
   return encoded






def     _snake_case    (__lowercase):
   if set(__lowercase) - {"A", "B", " "} != set():
      raise Exception('decode() accepts only \'A\', \'B\' and spaces')
   UpperCamelCase_									=     ''
   for word in coded.split():
      while len(__lowercase) != 0:
         decoded += decode_dict[word[:5]]
         UpperCamelCase_									=     word[5:]
      decoded += " "
   return decoded.strip()


if __name__ == "__main__":
 from doctest import testmod

 testmod()













def     _snake_case    (__lowercase = 1000):
   UpperCamelCase_		,      UpperCamelCase_									=     1, 1
   UpperCamelCase_									=     2
   while True:
      UpperCamelCase_									=     0
      UpperCamelCase_									=     fa + fa
      UpperCamelCase_		,      UpperCamelCase_									=     fa, f
      index += 1
      for _ in str(__lowercase):
         i += 1
      if i == n:
         break
   return index


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





