Problem: 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.

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;
public class ladder {

	static int MOD=(int)1e9+7;
	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();
		int [][]dp=new int [k+1][k+1];
		for(int j=0;j<=k;j++)
		{
			dp[j][0]=j==0?1:0;
			for(int i=1;i<=j;i++) {
				dp[j][i]=(int) ((dp[j-1][i]*1l*i+1l*dp[j-1][i-1]*(n-i+1))%MOD);
			}
		}
		
		long ans=0;
		for(int i=1;i<=Math.min(n, k);i++) {
			ans=(ans+dp[k][i]*1l*pow(2,n-i))%MOD;
		}
		out.println(ans);
		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());
		}
	}

}