#include using namespace std; template T power(T a, T b, T mod) { if (b == 0) return 1; T res = power(a, b / 2, mod); if (b % 2) res = res * res % mod * a % mod; else res = res * res % mod; return res; } int main() { long N, mod = 1000000007; cin >> N; if (N == 1) cout << 2; else if (N % 2) cout << 12 * power(5l, N / 2 - 1, mod) % mod; else cout << 4 * power(5l, N / 2 - 1, mod) % mod; }