from functools import lru_cache @lru_cache def calc_patterns(num: int) -> int: match num: case 0: return 1 case 1: return 1 case _: return calc_patterns(num - 1) + calc_patterns(num - 2) def main(): N = int(input()) print(calc_patterns(N)) if __name__ == "__main__": main()