#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,n,ans=0; cin>>a>>b; n=a*b; c=2*(2^(n-1)); ans=c*2-1; cout<<ans; return 0; }