import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
int m = sc.nextInt();
System.out.println(check(n, m));
}
sc.close();
}
private static int check(int n, int m) {
if (n == 1 || m == 1) {
return n + m;
}
return check(n - 1, m) + check(n, m - 1);
}
}