import sys input = sys.stdin.readline mod=10**9+7 FACT=[1] for i in range(1,2*10**5+1): FACT.append(FACT[-1]*i%mod) FACT_INV=[pow(FACT[-1],mod-2,mod)] for i in range(2*10**5,0,-1): FACT_INV.append(FACT_INV[-1]*i%mod) FACT_INV.reverse() def Combi(a,b): if 0<=b<=a: return FACT[a]*FACT_INV[b]%mod*FACT_INV[a-b]%mod else: return 0 def calc(n): DP=[0]*(n*2+1) DP[n]=1 ANS=0 for i in range(n*2): NDP=[0]*(n*2+1) for j in range(n*2): NDP[j+1]+=DP[j] if j-1>=0: NDP[j-1]+=DP[j] DP=NDP ANS+=DP[-1] #print(DP[-1]) return ANS #a(n) = 8*binomial(2*n+1,n-3)/(n+5). #a(n) = 9*binomial(2n,n-4)/(n+5). #a(n) = 10*C(2n+1, n-4)/(n+6). #a(n) = 11*binomial(2n,n-5)/(n+6). #a(n) = 12 * C(2n+1,n-5) / (n+7). #a(n) = 13*binomial(2n,n-6)/(n+7). #for i in range(1,20): # print(i,calc(i)) n=int(input()) ANS=0 for i in range(n): if n%2==0: ANS+=n*Combi(2*i+1,i-(n-1)//2)*pow(i+(n+2)//2,mod-2,mod) else: ANS+=n*Combi(2*i,i-(n-1)//2)*pow(i+(n+2)//2,mod-2,mod) print(ANS%mod)