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