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:
//package feb18;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

public class ICMTNex
{
	InputStream is;
	PrintWriter out;
	String INPUT = "";
	boolean codechef=true;
	//boolean codechef=false;
	
	static int mod=1000000007;
	static int n;
	static int[][] dp=new int[5001][5001];
	void solve()
	{
		n=ni();
		int k=ni();
		for(int i=0;i<5001;i++)
		{
			for(int j=0;j<5001;j++)
			{
				dp[i][j]=-1;
			}
		}
		System.out.println(comp(k, 0));
	}
	
	static int comp(int k, int b) 
	{
		//System.out.println(k);
		int c=n-b;
		if(c<0)c=0;
		//System.out.println("c:"+c);
		if(k==0)
		{
			return pow(2, c, mod);
		}
		if(dp[k][b]>=0)return dp[k][b];
		long val1=((long)c*comp(k-1, b+1))%mod;
		if(c<0)val1=0;
		long val2=((long)b*comp(k-1, b))%mod;
		if(b<0)val2=0;
		long val=(val1+val2)%mod;
		dp[k][b]=(int)val;
		return (int)val;
	}

	static int g(int n)
	{
		if(n<10)return n;
		return g(f(n));
	}
	
	static int f(int n)
	{
		int curr=n;
		int prod=1;
		while(curr!=0)
		{
			if((curr%10)!=0)prod*=curr%10;
			curr/=10;
		}
		return prod;
	}
	
	static long gcd(long  a,long b) 
	{
		long r;
		while(b!=0)
		{
			r = a % b;
		    a = b;
		    b = r;
		}
		return a;
	}
	
	static int pow(int a, int b, int p)
	{
		long ans = 1, base = a;
		while (b!=0)
		{
			if ((b & 1)!=0)
			{
				ans *= base;
				ans%= p;
			}
			base *= base;
			base%= p;
			b >>= 1;
		}
		return (int)ans;
	}

	static int inv(int x, int p)
	{
		return pow(x, p - 2, p);
	}

	void run() throws Exception
	{
		oj=codechef;
		//if(putIp)createTestCases();
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}
	

	public static void main(String[] args) throws Exception {new ICMTNex().run();}
	
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	
	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	
	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	
	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	
	private int[][] na2(int n,int m)
	{
		int[][] a = new int[n][m];
		for(int i = 0;i < n;i++)
		{
			for(int j=0;j<m;j++)
			{
				a[i][j]=ni();
			}
		}
		return a;
	}
	
	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}