N=int(input()) if N in (1,2): ans=0 else: mod=10**9+7 dp=[1] for i in range(1,N): prev=[0]+dp for j in range(1,i+1): prev[j]+=prev[j-1] prev[j]%=mod if i%2: dp=[(prev[j]-prev[0])%mod for j in range(i+1)] else: dp=[(prev[i]-prev[j])%mod for j in range(i+1)] ans=sum(dp)*2%mod print(ans)