import std.stdio, std.string, std.conv, std.range, std.algorithm;

ulong fact(ulong x) {
  ulong z = 1;
  foreach(i; iota(1, x + 1)) {
    z *= i;
    z %= 1000000007;
  }

  return z;
}

void main() {
  auto WH = readln.chomp.split.map!(to!int);
  auto W = WH[0];
  auto H = WH[1];

  auto answer = fact(W + H - 2) / (fact(W - 1) * fact(H - 1));
  answer.writeln;
}
