using System; using System.Linq; using System.Collections.Generic; public static class Program{ static int mod = 1000000007; public static void Main() { int[]np=Console.ReadLine().Split().Select(int.Parse).ToArray(); int n=np[0]; int p=np[1]; int[]a=new int[n]; a[0]=0; a[1]=1; for(int i=2;i0;y/=2){ if(y%2==1)MulAssign(ref ans,x); MulAssign(ref x,x); } return ans; } static int Inv(int x){ return Pow(x,mod-2); } }