def main(): N = int(input()) before_patterns = 0 current_patterns = 1 for _ in range(N): before_patterns, current_patterns = current_patterns, before_patterns + current_patterns print(current_patterns) if __name__ == "__main__": main()