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;
int i, j;
long long n, k, mod, ans, comb[5005];
int stir[5005][5005];
long long power(long long a, long long b) {
  if (b < 0) return 0;
  if (b == 0) return 1;
  long long temp = power(a, b >> 1);
  if (b & 1) {
    return temp * temp % mod * a % mod;
  } else {
    return temp * temp % mod;
  }
}
long long getmin(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  mod = 1000000007;
  scanf("%lld%lld", &n, &k);
  stir[1][1] = 1;
  for (i = 2; i <= k; i++) {
    for (j = 1; j <= i; j++) {
      stir[i][j] = (stir[i - 1][j - 1] + (long long)stir[i - 1][j] * j) % mod;
    }
  }
  ans = 0;
  comb[1] = n;
  for (i = 2; i <= k; i++) {
    comb[i] = comb[i - 1] * (n - i + 1) % mod;
  }
  for (j = 1; j <= k; j++) {
    ans += stir[k][j] * comb[j] % mod * power(2, n - j) % mod;
  }
  ans %= mod;
  printf("%lld\n", ans);
  return 0;
}