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>
inline int pidorand() { return ((rand() & 32767) << 15) | (rand() & 32767); }
using namespace std;
inline int nxt() {
  int x;
  scanf("%d", &x);
  return x;
}
const int mod = 1000000007;
using Poly = vector<long long>;
Poly mult(const Poly& a, const Poly& b) {
  Poly c(a.size() + b.size() - 1);
  for (int i = 0; i < (int)a.size(); ++i) {
    for (int j = 0; j < (int)b.size(); ++j) {
      c[i + j] += a[i] * b[j] % mod;
    }
  }
  for (auto& x : c) {
    x %= mod;
  }
  return c;
}
long long pw(long long a, long long b) {
  if (b < 0) {
    return 0;
  }
  long long res = 1;
  while (b) {
    if (b & 1ll) {
      res = res * a % mod;
    }
    b >>= 1;
    a = a * a % mod;
  }
  return res;
}
long long kljhaflhadf(const Poly& p, long long x) {
  long long res = 0;
  long long cur = 1;
  for (long long c : p) {
    res += c * cur % mod;
    cur = cur * x % mod;
  }
  return res % mod;
}
int main() {
  int n = nxt(), k = nxt();
  vector<Poly> ffs(k + 1);
  ffs[0] = {1};
  for (int i = 1; i <= k; ++i) {
    ffs[i] = mult(ffs[i - 1], {mod - i + 1, 1});
  }
  vector<long long> a(k + 1);
  a[k] = mod - 1;
  for (int i = k; i >= 0; --i) {
    int c = mod - a[i];
    for (int j = 0; j <= i; ++j) {
      a[j] = (a[j] + ffs[i][j] * c) % mod;
    }
    a[i] = c;
  }
  long long ans = 0;
  for (int i = 0; i <= k; ++i) {
    ans += kljhaflhadf(ffs[i], n) * pw(2, n - i) % mod * a[i] % mod;
  }
  cout << ans % mod << "\n";
  return 0;
}