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>
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
using namespace std;
inline void print_arr(int *a, int n) {
  for (int i = 0; i < n; i++) {
    printf("%d%c", a[i], i == n - 1 ? '\n' : ' ');
  }
}
inline void read_arr(int *a, int n) {
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
}
const double eps = 1e-6;
const long long mod = 1e9 + 7;
const int maxn = 1e5 + 100;
const int maxe = 1e6 + 100;
int n, k;
long long POW(long long x, long long n, long long p) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * x) % p;
    x = x * x % p;
    n /= 2;
  }
  return res;
}
long long dp[5050][5050];
int Fill(int diffs, int a, int tot) {
  if (dp[diffs][a] >= 0) return dp[diffs][a];
  int b = tot - a;
  if (diffs == 0) {
    return dp[diffs][a] = POW(2, b, mod);
  }
  return dp[diffs][a] = (((b ? 1LL * b * Fill(diffs - 1, a + 1, tot) : 0LL) +
                          (a ? 1LL * a * Fill(diffs - 1, a, tot) : 0LL)) %
                         mod);
}
void Solve() {
  cin >> n >> k;
  memset(dp, -1, sizeof(dp));
  cout << Fill(k, 0, n) << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  int Case = 1, cases;
  while (Case--) {
    Solve();
  }
  return 0;
}
