#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int m, n;
int cnt;
void dfs(int x, int y)
{
if (x > m || y > n) {
return;
}
if (x == m && y == n) {
cnt++;
return;
}
if (x % 2 == 1 && y % 2 == 1) {
dfs(x + 1, y);
dfs(x, y + 1);
}
else {
if (x % 2 == 0) {
dfs(x + 1, y);
}
else {
dfs(x, y + 1);
}
}
}
int main()
{
cin >> m >> n;
dfs(1, 1);
cout << cnt << endl;
return 0;
}