#include <bits/stdc++.h>
using namespace std;
double eps = 1e-9;
const int INF = 1e9 + 7;
const int MAXN = int(3e5 + 7);
int n, m, cur, ans = 1, mod = INF + 2;
int binpow(int a, int n) {
  int res = 1;
  while (n) {
    if (n & 1) res = (res * 1ll * a) % mod;
    a = (a * 1ll * a) % mod;
    n >>= 1;
  }
  return res;
}
int main() {
  cin >> n >> m;
  cur = (mod + binpow(2, m) - 1) % mod;
  for (int i = 0; i < n; i++) {
    ans = (ans * 1ll * cur) % mod;
    cur = (cur + mod - 1) % mod;
  }
  cout << ans << endl;
  return 0;
}
