import java.io.*; import java.util.*; class Main314 { public static long solve (int n) { if (n == 1) return 1; if (n <= 3) return 2; long[] p = new long[n]; int m = 1000000007; p[1] = 0; if (n > 2) p[2] = 1; if (n > 3) p[3] = 1; for (int i = 4; i < n; i++) p[i] = (p[i - 2] + p[i - 3]) % m; return (p[n - 1] + 2 * p[n - 2] + p[n - 3]) % m; } public static void out (Object o) { System.out.println(o); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); out(solve(n)); } }