#include using namespace std; typedef long long ll; #define int ll const int mod = 1e9 + 7; int n; inline int ksm(int a, int b, int mod) { b = b % (mod - 1); int res = 1; while (b) { if (b & 1ll) res = res * a % mod; a = a * a % mod; b >>= 1ll; } return res; } signed main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen("crotate.in", "r", stdin); // freopen("crotate.out", "w", stdout); cin >> n; if (n == 1) { cout << 2 << "\n"; return 0; } if (n % 2 == 1) { n /= 2; cout << 12 * ksm(5, n - 1, mod) % mod << "\n"; } else { n /= 2; cout << 4 * ksm(5, n - 1, mod) % mod << "\n"; } }