n = int(input()) y = 10**9 + 7 if n == 1: x = 2 elif n == 2: x = 4 elif n == 3: x = 12 elif n % 2 == 0: x = pow(5, n//2-2, y) * 4 * 5 else: x = pow(5, n//2-1, y) * 4 * 3 print(x % y)