#include #include #include #include #include #include #include #include #include #define ASDF (1000000007) int main(void) { long n; std::cin >> n; if(n == 1){ std::cout << 2 << std::endl; } else if(n == 2){ std::cout << 4 << std::endl; } else if(n == 3){ std::cout << 12 << std::endl; } else { long tot = 1 + (n % 2) * 2;//1(even) or 3(odd) // tot * 4 * 5^([n/2] - 1) tot *= 4; long cnt = n / 2 - 1; for(long i = 0; i < cnt; i++){ tot = (tot * 5) % ASDF; } std::cout << tot << std::endl; } return 0; }