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;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 5e3 + 10;
const int MOD = 1e9 + 7;
inline int add(int a, int b) {
  a = a + b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline int mul(int a, int b) { return a * 1ll * b % MOD; }
inline int power(int a, int p) {
  int ret = 1;
  while (p) {
    if (p & 1) ret = mul(ret, a);
    a = mul(a, a);
    p >>= 1;
  }
  return ret;
}
inline int inv(int x) { return power(x, MOD - 2); }
int nCr(int n, int r) {
  int num = 1, den = 1;
  for (int sub = 0; sub < r; sub++) {
    num = mul(num, n - sub);
    den = mul(den, sub + 1);
  }
  return mul(num, inv(den));
}
int ST[N][N], fact[N];
void pre() {
  fact[0] = 1;
  for (int i = (1); i < (N); ++i) fact[i] = mul(i, fact[i - 1]);
  for (int i = (1); i < (N); ++i) ST[i][1] = 1;
  for (int i = (2); i < (N); ++i)
    for (int j = (2); j < (i + 1); ++j) {
      ST[i][j] = add(ST[i - 1][j - 1], mul(j, ST[i - 1][j]));
    }
}
int main() {
  int n, k;
  cin >> n >> k;
  pre();
  int sum = 0;
  for (int i = (0); i < (k + 1); ++i) {
    int v = fact[i];
    v = mul(v, ST[k][i]);
    v = mul(v, nCr(n, i));
    v = mul(v, inv(power(2, i)));
    sum = add(sum, v);
  }
  sum = mul(sum, power(2, n));
  cout << sum << endl;
  return 0;
}