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 K = 5020, Mod = 1e9 + 7;
inline int inc(int a, int b) { return a + b >= Mod ? a + b - Mod : a + b; }
inline int dec(int a, int b) { return a - b < 0 ? a - b + Mod : a - b; }
inline int mul(int a, int b) { return 1LL * a * b % Mod; }
inline void Inc(int &a, int b) { return void(a = inc(a, b)); }
inline void Dec(int &a, int b) { return void(a = dec(a, b)); }
inline void Mul(int &a, int b) { return void(a = mul(a, b)); }
inline int fastpow(int a, int b) {
  int c = 1;
  for (; b; Mul(a, a), b >>= 1)
    if (1 & b) Mul(c, a);
  return c;
}
int n, k, s[K][K], inv[K], fac[K], Ans;
inline int C(int n, int m) {
  int s = 1;
  for (int i = 1; i <= m; i++) Mul(s, mul(n - i + 1, inv[i]));
  return s;
}
int main(void) {
  scanf("%d%d", &n, &k), inv[1] = fac[1] = 1, s[0][0] = 1;
  for (int i = 2; i <= k; i++)
    inv[i] = mul(Mod - Mod / i, inv[Mod % i]), fac[i] = mul(fac[i - 1], i);
  for (int i = 1; i <= k; i++)
    for (int j = 1; j <= k; j++)
      s[i][j] = inc(s[i - 1][j - 1], mul(j, s[i - 1][j]));
  for (int i = 1; i <= min(k, n); i++) {
    int v = mul(s[k][i], mul(C(n, i), fac[i]));
    Mul(v, fastpow(2, n - i)), Inc(Ans, v);
  }
  return printf("%d\n", Ans) * 0;
}