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>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using PII = pair<int, int>;
using TI3 = tuple<int, int, int>;
using LL = long long;
using ULL = unsigned long long;
using MAT = array<array<LL, 2>, 2>;
template <class T>
void _read(T &x) {
  cin >> x;
}
void _read(int &x) { scanf("%d", &x); }
void _read(LL &x) { scanf("%lld", &x); }
void _read(double &x) { scanf("%lf", &x); }
void _read(char &x) { scanf(" %c", &x); }
void _read(char *x) { scanf("%s", x); }
void read() {}
template <class T, class... U>
void read(T &head, U &...tail) {
  _read(head);
  read(tail...);
}
template <class T>
void _print(const T &x) {
  cout << x;
}
void _print(const int &x) { printf("%d", x); }
void _print(const LL &x) { printf("%lld", x); }
void _print(const double &x) { printf("%.16lf", x); }
void _print(const char &x) { putchar(x); }
void _print(const char *x) { printf("%s", x); }
template <class T>
void _print(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _print(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void print() {}
template <class T, class... U>
void print(const T &head, const U &...tail) {
  _print(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  print(tail...);
}
const int MOD = 1000000007;
LL a[5005], b[5005];
LL mypow(LL a, LL p) {
  long long ret = 1;
  while (p) {
    if (p & 1) {
      ret = (ret * a) % MOD;
    }
    a = (a * a) % MOD;
    p >>= 1;
  }
  return ret;
}
int main() {
  LL n, k;
  read(n, k);
  a[0] = 1;
  for (int i = 1; i < (int)(k + 1); i++) {
    memset(b, 0, sizeof(b));
    for (int j = 0; j < (int)(5005); j++) {
      b[j] = (b[j] + (j * a[j]) % MOD) % MOD;
      b[j + 1] = (b[j + 1] + a[j]) % MOD;
    }
    swap(a, b);
  }
  LL ans = 0;
  LL inv = mypow(2, MOD - 2);
  LL t = mypow(2, n);
  for (int i = 0; i < (int)(5005); i++) {
    ans = (ans + (a[i] * t) % MOD) % MOD;
    t = (t * (n - i)) % MOD;
    t = (t * inv) % MOD;
  }
  print(ans);
  return 0;
}