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;
vector<pair<int, pair<int, int>>> cur, nxt;
int m[100000];
int mul(int a, int b) {
  int y = (a * 1LL * b) % 1000000007;
  return y;
}
int powmod(int a, int b) {
  if (b == 0) return 1;
  if (b & 1) return mul(a, powmod(a, b - 1));
  return powmod(mul(a, a), (b >> 1));
}
void diff(int n) {
  nxt.clear();
  int minidx = n + 1, maxidx = -1;
  for (int i = 0; i < cur.size(); ++i) {
    minidx = min(minidx, cur[i].second.first - 1);
    maxidx = max(maxidx, cur[i].second.first);
    m[(cur[i].second.first - 1)] +=
        (cur[i].first * 1LL * cur[i].second.first) % 1000000007;
    if (m[(cur[i].second.first - 1)] >= 1000000007)
      m[(cur[i].second.first - 1)] -= 1000000007;
    m[(cur[i].second.first)] +=
        (cur[i].first * 1LL * cur[i].second.second) % 1000000007;
    if (m[(cur[i].second.first)] >= 1000000007)
      m[(cur[i].second.first)] -= 1000000007;
  }
  for (int i = minidx; i <= maxidx; ++i) {
    if (m[i]) nxt.push_back({m[i], {i + 1, n - i - 1}});
    m[i] = 0;
  }
  cur.swap(nxt);
}
signed main() {
  int n, k;
  scanf("%d", &n);
  scanf("%d", &k);
  cur.push_back({1, {0, n}});
  while (k--) {
    diff(n);
  }
  int ans = 0;
  for (int i = 0; i < cur.size(); ++i) {
    ans += mul(cur[i].first, powmod(2, cur[i].second.second));
    if (ans >= 1000000007) ans -= 1000000007;
  }
  printf("%d\n", ans);
  return 0;
}