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.
#include <bits/stdc++.h>
using namespace std;
const long long G = 3;
const long long M = 1e9 + 7;
const long long ff = 1e6 + 1;
const long long base = 2333;
inline long long read() {
  long long x;
  scanf("%lld", &x);
  return x;
}
long long S[5001][5001], n, k, Ans;
long long gs(long long l, long long r, long long s = 1) {
  for (long long i = l; i <= r; ++i) s = s * i % M;
  return s;
}
long long ksm(long long a, long long b) {
  return (b % 2 == 1 ? a : 1LL) * (b == 0 ? 1LL : ksm(a * a % M, b / 2)) % M;
}
void init() {
  for (long long i = 0; i <= 5000; ++i) S[i][0] = S[i][1] = S[i][i] = 1;
  for (long long i = 2; i <= 5000; ++i)
    for (long long j = 2; j <= i - 1; ++j)
      S[i][j] = (S[i - 1][j] * j + S[i - 1][j - 1]) % M;
  cin >> n >> k;
  for (long long i = 1; i <= k; ++i)
    Ans = (Ans + S[k][i] * gs(n - i + 1, n) % M * ksm(2, n - i) % M) % M;
  cout << Ans;
}
signed main() {
  long long Ts = 1;
  while (Ts--) init();
}
