#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; #define REP(i,n) for(int i=0;i>=1; } return ret; } ll divid(ll x, ll y){ x%=MOD; return x*power(y,MOD-2)%MOD; } int main(){ int n; cin >> n; ll a=1, b=1, ans=0; ans+=2*power(2,n)%MOD; for(int i=2;i<=n;i+=2){ a=(a*(n-i+1))%MOD*(n-i+2)%MOD; b=(b*i)%MOD*(i-1)%MOD; ans=(ans+divid(a,b)*power(2,abs(i-(n-i))+1)%MOD)%MOD; } cout << ans << endl; return 0; }