#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef vector VVL; typedef pair P; typedef pair PL; const ll mod = 1e9+7; ll powll(ll x, ll y){ ll res = 1LL; while(y){ if (y & 1LL) res *= x; res %= mod; x = (x*x) % mod; y >>= 1LL; } return res; } int main(){ ll n; cin >> n; ll ans = 0; if (n == 1){ ans = 2; }else if (n % 2 == 0){ ans = powll(5, n/2-1); ans = (ans * 4) % mod; }else{ ans = powll(5, n/2-1); ans = (ans * 4 * 3) % mod; } cout << ans << endl; return 0; }