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 Add(int &a, int b) { a = (a + b) % 1000000007; }
int Min(int &a, int b) { a = (a + 1000000007 - b) % 1000000007; }
int Mul(int &a, int b) { a = (long long)a * b % 1000000007; }
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long pow1(long long a, long long b) {
  long long res(1);
  while (b) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
    b >>= 1;
  }
  return res;
}
long long powM(long long a, long long b, long long mod) {
  long long res(1);
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
const int infi = 2147483647;
const long long infl = 9223372036854775807;
int n, m, k, T;
long long f[5024][5024];
int main() {
  scanf("%d", &n), scanf("%d", &k);
  for (long long b = 0; b <= k; ++b) f[0][b] = n >= b ? pow1(2, n - b) : 0;
  for (int i = 1; i <= (k); ++i) {
    for (long long b = 0; b <= k - i; ++b) {
      long long c = n - b;
      f[i][b] = b * f[i - 1][b] % 1000000007 + c * f[i - 1][b + 1] % 1000000007;
      f[i][b] %= 1000000007;
    }
  }
  printf("%I64d", (f[k][0])), putchar('\n');
  return 0;
}