using System; using System.Linq; namespace y { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); bool f = false; if (n % 2 == 0) f = true; else f = false; if (n == 1) { Console.WriteLine(2); return; } int cnt = 0; if (f) { cnt = n / 2 - 1; } else { cnt = n / 2; } long ans = 1; for (int i = 1; i <= cnt; i++) { if (i == 1) { ans = ans * 4 % 1000000007; } else { ans = ans * 5 % 1000000007; } } if (n != 2) { if (f) { ans = ans * 5 % 1000000007; } else { ans = ans * 3 % 1000000007; } } Console.WriteLine(ans); Console.ReadLine(); } } }