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>
const uint64_t mod = 1000000007;
inline void f(std::vector<uint64_t>& T, const int& k, const int& N) {
  for (int i = 1; i != k + 1; ++i) {
    for (int j = i, n = N - i + 1; j; --j, ++n) {
      (T[j] *= j) += n * T[j - 1];
      T[j] %= mod;
    }
    T[0] = 0;
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  int N, k;
  std::cin >> N >> k;
  if (N == 1) {
    std::cout << 1 << std::endl;
    return 0;
  }
  std::vector<uint64_t> T(k + 1, 0);
  T[0] = 1;
  f(T, k, N);
  std::vector<uint64_t> p2(k + 1, 0);
  {
    int j = N;
    std::vector<int> p;
    uint64_t p2N = 1;
    while (j) {
      p.push_back(j & 1);
      j >>= 1;
    }
    for (int i = p.size() - 1; i != -1; --i) {
      p2N *= p2N;
      p2N %= mod;
      if (p[i]) {
        p2N <<= 1;
        p2N %= mod;
      }
    }
    p2[0] = p2N;
  }
  for (int i = 1; i != k + 1 && i != N + 1; ++i)
    p2[i] = (p2[i - 1] * 500000004) % mod;
  uint64_t res = 0;
  for (int i = 0; i != k + 1 && i != N + 1; ++i) {
    res += (p2[i] * T[i]);
    res %= mod;
  }
  std::cout << res << std::endl;
  return 0;
}