#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
int main()	{
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	int n, m;
	scanf("%d%d", &n, &m);
		ll ans = 1;
		for (int i = 1; i <= m; i++)	ans = (ans * 2) % mod;
		printf("%lld\n", ans * ans % mod);
}