#include #include #include #include #include #include #include #include using namespace std; static const double pi = 3.14159265358979323846; long long mod = 1000000007; int main(){ int N; cin >> N; if(N==1) {cout << 2 << endl; return 0;} bool even = N%2 == 0; long long ret = 1; for(int i=0; i<(N+1)/2; i++){ if(i==0) {ret *= 4; ret %= mod;} else if (i==((N+1)/2-1)){ if(even) {ret *= 5; ret %= mod;} else {ret *= 3; ret %= mod;} } else{ ret *= 5; ret %= mod; } } cout << ret << endl; return 0; }