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 N = 5010, mod = 1LL * 1000 * 1000 * 1000 + 7;
long long dp[N][N], inv_fact[N], fact[N], n, k;
long long Pow(long long a, long long b) {
  return b ? (b & 1 ? a : 1) % mod * Pow(a * a % mod, b >> 1) % mod : 1;
}
int C(int r, int n) {
  if (r > n) return 0;
  int num = 1;
  for (int i = n; i >= n - r + 1; i--) num = 1LL * num * i % mod;
  num = 1LL * num * inv_fact[r] % mod;
  return num;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  fact[0] = 1;
  for (int i = 1; i < N; i++) fact[i] = 1LL * fact[i - 1] * i % mod;
  inv_fact[N - 1] = Pow(fact[N - 1], mod - 2);
  for (int i = N - 2; i >= 0; i--)
    inv_fact[i] = 1LL * inv_fact[i + 1] * (i + 1) % mod;
  for (int i = 1; i < N; i++) dp[1][i] = 1;
  for (int i = 2; i < N; i++)
    for (int j = i; j < N; j++)
      dp[i][j] = 1LL * (dp[i - 1][j - 1] + dp[i][j - 1]) % mod * i % mod;
  cin >> n >> k;
  long long ans = 0;
  for (int r = 1; r <= min(k, n); r++) {
    long long t = Pow(2, n - r);
    t = 1LL * t * dp[r][k] % mod;
    t = 1LL * t * C(r, n) % mod;
    ans = (1LL * ans + t) % mod;
  }
  cout << ans << '\n';
  return 0;
}