package no314; import java.util.Scanner; public class Main { public static final long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[][] dp = new long[n+1][3]; dp[0][0] = 1; for(int i=0;i 0) { dp[i+1][0] = (dp[i+1][0] + dp[i][j]) % MOD; } if (j < 2) { dp[i+1][j+1] = (dp[i+1][j+1] + dp[i][j]) % MOD; } } } long ans = 0; for(int i=0;i<3;i++) { ans = (ans + dp[n][i]) % MOD; } System.out.println(ans); } }