package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

const MOD = 1e9 + 7
func main() {
	N := nextInt()

	var dp = make([][]int, N + 1)
	for i := 0; i < N + 1; i++ {
		dp[i] = make([]int, 4)
	}
	dp[0][0] = 0
	dp[0][1] = 1
	dp[0][2] = 0

	for i := 1; i < N; i++ {
		for k := 2; k > 0; k-- {
			dp[i][k] += dp[i - 1][k - 1]
			dp[i][k] %= MOD
		}
		for k := 3; k > 1; k-- {
			dp[i][0] += dp[i - 1][k - 1]
			dp[i][0] %= MOD
		}

	}
	var total = 0
	for k := 2; k >= 0; k-- {
		total += dp[N - 1][k]
		total %= MOD
	}
	fmt.Println(total)


}

var s = bufio.NewScanner(os.Stdin)

func next() string {
	s.Split(bufio.ScanWords)
	s.Scan()
	return s.Text()
}
func nextLine() string {
	s.Split(bufio.ScanLines)
	s.Scan()
	return s.Text()
}

func nextInt() int {
	i, e := strconv.Atoi(next())
	if e != nil {
		panic(e)
	}
	return i
}
func nextLong() int64 {
	i, e := strconv.ParseInt(next(), 10, 64)
	if e != nil {
		panic(e)
	}
	return i
}