import java.util.*; public class Exercise59{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long m = (long)(Math.pow(10, 9) + 7); 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]); } System.out.println(dp[n - 1] % m); } }