import sys n=int(input()) dp=[0]*3 for i in range(n): if i<2: dp[i]=1 else: dp[i%3]=dp[(i-1)%3]+dp[(i-2)%3] print(max(dp))