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