n = gets.to_i if n == 1 puts 2 exit end MOD = 10**9 + 7 ans = 4 * 5.pow(n / 2 - 1, MOD) % MOD ans = ans * 3 % MOD if n % 2 == 1 puts ans