/* -*- coding: utf-8 -*- * * 557.cc: No.557 点対称 - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ typedef long long ll; const ll MOD = 1000000007; /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n; cin >> n; if (n == 1) puts("2"); else { int nh = n / 2; ll p = 4; for (int i = 1; i < nh; i++) p = (p * 5) % MOD; if (n & 1) p = (p * 3) % MOD; printf("%lld\n", p); } return 0; }