You have a team of N people. For a particular task, you can pick any non-empty subset of people. The cost of having x people for the task is xk. 

Output the sum of costs over all non-empty subsets of people.

Input

Only line of input contains two integers N (1 ≤ N ≤ 109) representing total number of people and k (1 ≤ k ≤ 5000).

Output

Output the sum of costs for all non empty subsets modulo 109 + 7.

Examples

Input

1 1


Output

1


Input

3 2


Output

24

Note

In the first example, there is only one non-empty subset {1} with cost 11 = 1.

In the second example, there are seven non-empty subsets.

- {1} with cost 12 = 1

- {2} with cost 12 = 1

- {1, 2} with cost 22 = 4

- {3} with cost 12 = 1

- {1, 3} with cost 22 = 4

- {2, 3} with cost 22 = 4

- {1, 2, 3} with cost 32 = 9

The total cost is 1 + 1 + 4 + 1 + 4 + 4 + 9 = 24.
import java.util.*;
import java.io.*;
public class ladder {

	static int MOD=(int)1e9+7;
	static int [][]memo;
	static int dp(int a,int b,int c) {
		if(memo[a][b]!=-1)
			return memo[a][b];
		long ans;
		if(a==0) {
			ans=pow(2,c);
		}
		else {
			long v1=0,v2=0;
			if(b>0)
				v1=1l*b*dp(a-1,b,c)%MOD;
			if(c>0)
				v2=1l*c*dp(a-1,b+1,c-1)%MOD;
			ans=v1+v2;
			if(ans>=MOD)
				ans-=MOD;
		}
		return memo[a][b]= (int)ans;
	}
	static int pow(long b,int e) {
		long ans=1;
		while(e>0) {
			if((e&1)==1)
				ans=ans*b%MOD;
			b=b*b%MOD;
			e>>=1;
		}
		return (int)ans;
	}
	public static void main(String[] args) throws IOException {
		PrintWriter out=new PrintWriter(System.out);
		Scanner sc=new Scanner();
		int n=sc.nextInt(),k=sc.nextInt();
		memo=new int [k+2][k+2];
		for(int []a:memo)
			Arrays.fill(a, -1);
		out.println(dp(k, 0, n));
		out.close();

	}
	
	static class Scanner
	{
		BufferedReader br;
		StringTokenizer st;
		Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		Scanner(String fileName) throws FileNotFoundException{
			br=new BufferedReader(new FileReader(fileName));
		}
		String next() throws IOException {
			while(st==null || !st.hasMoreTokens())
				st=new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		int nextInt() throws IOException{
			return Integer.parseInt(next());
		}
	}

}