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>
using namespace std;
const int mod = 1e9 + 7;
const int inv = mod / 2 + 1;
int C[5005], n, S[5005];
int K;
int ksm(int x, int y) {
  int an = 1;
  for (; y; y >>= 1, x = x * (long long)x % mod)
    if (y & 1) an = an * (long long)x % mod;
  return an;
}
int main() {
  cin >> n >> K;
  C[0] = 1;
  for (int i = 1; i <= K; i++) C[i] = (long long)C[i - 1] * (n - i + 1) % mod;
  S[1] = 1;
  int ci = ksm(2, n);
  for (int i = 2; i <= K; i++)
    for (int j = i; j; j--) {
      S[j] = (S[j] * (long long)j + (long long)S[j - 1]) % mod;
    }
  int ans = 0;
  for (int i = 1; i <= K; i++) {
    ci = ci * (long long)inv % mod;
    ans = ((long long)ans + S[i] * (long long)ci % mod * (long long)C[i]) % mod;
  }
  cout << ans << endl;
  return 0;
}
