#include typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; ll powmod(ll x,ll n){ if(n == 0)return 1; ll ans = powmod(x*x%MOD,n/2); if(n % 2 == 1)ans = ans * x % MOD; return ans; } main(){ ll N; cin >> N; if(N == 1)cout << 2 << endl; else if(N%2 == 1)cout << 12*powmod(5,N/2-1)%MOD << endl; else cout << 4*powmod(5,N/2-1)%MOD << endl; }