import java.util.Scanner; public class Main_yukicoder314 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int MOD = 1_000_000_007; int n = sc.nextInt(); int[][] dp = new int[3][n]; dp[1][0] = 1; for (int i = 0; i < n - 1; i++) { for (int j = 0; j < 3; j++) { if (j < 2) { dp[j + 1][i + 1] = (dp[j + 1][i + 1] + dp[j][i]) % MOD; } if (j != 0) { dp[0][i + 1] = (dp[0][i + 1] + dp[j][i]) % MOD; } } } int ret = 0; for (int i = 0; i < 3; i++) { ret += dp[i][n - 1]; ret %= MOD; } System.out.println(ret); sc.close(); } }