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 sys
range = xrange
input = raw_input

N,K = [int(x) for x in input().split()]

MOD = 10**9+7
coeff = [0]*(K+1)
coeff[0] = 1

for iters in range(K):
    #print coeff
    for i in reversed(range(iters+1)):
        coeff[i+1] += coeff[i]
        coeff[i]= coeff[i]*i%MOD


#print coeff
mod2inv = 500000004
pow2 = pow(2,N,MOD)
summa = 0
for i in range(len(coeff)):
    summa = (summa + coeff[i]*pow2)%MOD
    pow2 = (pow2*mod2inv*(N-i))%MOD

print summa
