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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e3 + 10;
int fact[N], invfact[N];
int ST[N][N];
int n, k, res = 0;
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int mul(int x, int y) { return (((long long)x) * y) % mod; }
inline int powr(int a, long long b) {
  int x = 1 % mod;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a) { return powr(a, mod - 2); }
void pre() {
  fact[0] = invfact[0] = 1;
  for (int i = 1; i < N; i++) fact[i] = mul(i, fact[i - 1]);
  for (int x = 1; x < N; x++) ST[x][1] = 1;
  for (int x = 2; x < N; x++)
    for (int y = 2; y <= x; y++)
      ST[x][y] = add(ST[x - 1][y - 1], mul(y, ST[x - 1][y]));
}
inline int nCr(int n, int r) {
  int num = 1, den = 1;
  for (int x = 0; x < r; x++) {
    num = mul(num, n - x);
    den = mul(den, x + 1);
  }
  return mul(num, inv(den));
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  pre();
  cin >> n >> k;
  for (int x = 0; x <= k; x++)
    res =
        add(res, mul(ST[k][x], mul(mul(fact[x], nCr(n, x)), inv(powr(2, x)))));
  cout << mul(res, powr(2, n)) << "\n";
}