import java.util.*; import java.util.Arrays; class Main{ static int n; static long memo[][] = new long[1000010][3]; static long saiki(int now,int how_ken){ if(now == n) return 1; if(memo[now][how_ken] != -1) return memo[now][how_ken]; long sum = 0; if(how_ken == 0){ sum += saiki(now + 1,1); }else if(how_ken == 2){ sum += saiki(now + 1,0); }else{ sum += saiki(now + 1,how_ken + 1); sum += saiki(now + 1,0); } return memo[now][how_ken] = sum % 1000000007; } public static void main(String args[]){ Scanner sc = new Scanner(System.in); n = sc.nextInt(); for(int i = 0;i < 1000010;i++){ for(int j = 0;j < 3;j++){ memo[i][j] = -1; } } System.out.println(saiki(0,0) % 1000000007); } }