import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long MOD = (long)Math.pow(10, 9) + 7; int N = sc.nextInt(); // dp[i]は長さ(i+1)のコース数 mod MOD long[] dp = new long[N]; dp[0] = 1; dp[1] = 2; dp[2] = 2; for(int i = 3; i < N; i++) { dp[i] = (dp[i - 2] + dp[i - 3]) % MOD; } System.out.println(dp[N - 1]); } }