# -*- coding: utf-8 -*- N = int(input()) m = 10**9 + 7 dp = [-1] * (10**6+5) for i in range(1,N+1): if i==1: dp[i] = 1 elif i==2 or i==3: dp[i] = 2 else: dp[i] = (dp[i-2] + dp[i-3]) % m print(dp[N])