package main import ( "bufio" "fmt" "os" "strconv" ) const ( m = 1000000007 ) func mpow(x, y int) int { result := 1 for y != 0 { if y&1 == 1 { result *= x result %= m } x *= x x %= m y >>= 1 } return result } func main() { defer flush() N := readInt() result := 1 for i := 1; i < N*2; i++ { result *= i result %= m } result *= mpow(mpow(2, N), m-2) result %= m println(result) } const ( ioBufferSize = 1 * 1024 * 1024 // 1 MB ) var stdinScanner = func() *bufio.Scanner { result := bufio.NewScanner(os.Stdin) result.Buffer(make([]byte, ioBufferSize), ioBufferSize) result.Split(bufio.ScanWords) return result }() func readString() string { stdinScanner.Scan() return stdinScanner.Text() } func readInt() int { result, err := strconv.Atoi(readString()) if err != nil { panic(err) } return result } var stdoutWriter = bufio.NewWriter(os.Stdout) func flush() { stdoutWriter.Flush() } func println(args ...interface{}) (int, error) { return fmt.Fprintln(stdoutWriter, args...) }