dp = [] KEN = 0 PA = 1 def kenpa(ken_pa, remain, ken_seq): global dp if remain == 0: return 1 if dp[ken_pa][remain][ken_seq] != -1: return dp[ken_pa][remain][ken_seq] if ken_seq == 2: dp[ken_pa][remain][ken_seq] = kenpa(PA, remain-1, 0) elif ken_pa == PA: dp[ken_pa][remain][ken_seq] = kenpa(KEN, remain-1, ken_seq+1) else: dp[ken_pa][remain][ken_seq] = kenpa(KEN, remain-1, ken_seq+1) + kenpa(PA, remain-1, 0) return dp[ken_pa][remain][ken_seq] def main(): global dp N = int(input()) for ken_pa in range(2): dp.append([]) for remain_cell in range(N): dp[ken_pa].append([]) for ken_seq in range(3): dp[ken_pa][remain_cell].append(-1) answer = kenpa(KEN, N-1, 1) print(answer % (10**9 + 7)) main()