import java.io.*; import java.util.*; public class Main{ final long mo=(long)1e9+7; public static void main(String[] args){ new Main().run(); } void run(){ Scanner sc=new Scanner(System.in); int N=sc.nextInt(); int[] deg=new int[N]; for(int i=0;i0;n>>=1,a=a*a%mo){ if(n%2==1)ret=ret*a%mo; } return ret; } }