n = gets.to_i if n == 1 p 2 exit end if n == 2 p 4 exit end def powm(x, q, mod=1000000007) y=1 x=x%mod while (0 2 #oxx?xxo #oxxxxo # 1869 top = 1 # 18690 middle = n/2-1 # 180 # center result = 1 result *= top*4 result *= powm(5,middle) result *= 3 if n.odd? result = result %1000000007 p result