#include <bits/stdc++.h> using namespace std; int m,n; int main(){ cin>>m>>n; cout<<(1<<(max(m-1,n-1)+1))-(1<<min(m-1,n-1)); return 0; }