dp = [] def main(): global dp N = int(input()) if N == 2: print(2) return pattern = [2, 3] i = 0 while i < N-3: pattern.append(pattern[i] + pattern[i+1]) i += 1 print(pattern[-1]) main()