import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().run(); } static final long MOD=(long)1e9+7; long pow(long a,long n) { return n!=0?pow(a*a%MOD,n/2)*(n%2==1?a:1)%MOD:1; } long inv(long a) { return pow(a,MOD-2); } static int MAX=(int)5e4; static long[] fac=new long[MAX]; static long[] inv=new long[MAX]; static long[] ifac=new long[MAX]; { fac[0]=ifac[0]=inv[0]=inv[1]=1; for (int i=1;i=1;--i) { ifac[i]=(i+1)*ifac[i+1]%MOD; } for (int i=2;i=MOD?a+b-MOD:a+b; } void run() { FastScanner sc=new FastScanner(); long N=sc.nextLong()%MOD; int K=sc.nextInt(); long[] B=new long[K+2]; B[0]=1; for (int i=1;i=3) continue; long c=1; for (int j=0;j Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }