#include<bits/stdc++.h>
using namespace std;

#define int long long

template<class T>
inline bool read(T &x){
	x=0;char ch;bool f=0;
	for(ch=getchar();!isdigit(ch);ch=getchar()){
		if(ch==EOF)return 0;
		if(ch=='-')f=1;
	}
	for (;isdigit(ch);ch=getchar()){
		x=(x<<1)+(x<<3)+(ch^48);
	}
	if(f)x=-x;
	return 1;
} 

template<class T>
void write(T x){
	if(x<0){
		putchar('-');
		write(-x);
		return ;
	}
	if(x>9)write(x/10);
	putchar(x%10|48);
}

template<class T>
inline void writeln(T x){
	write(x);putchar('\n');
}

template<class T>
inline void writespace(T x){
	write(x);putchar(' ');
}

int T,n;
unsigned long long a[250010],b[250010];
int Q;

signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	read(T);read(n);
	write((1ll<<T)*(1ll<<n)-3ll);
	return 0;
}