long n,s,M=1000000007; main(){ scanf("%d",&n); s=n*n%M*n%M; printf("%d",s); }