#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7, mod = 1e9 + 7;
int n, m, g, ans, fac[N], inv[N];
int qpow(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % mod;
    b >>= 1;
    a = 1ll * a * a % mod;
  }
  return ret;
}
int cal(int n, int m, bool typ) {
  int ret = 0;
  if (n < 0 || m < 0 || typ && !n && m) return 0;
  if (!n && !m) return 1;
  for (int i = 0; 2 * i <= n; i++)
    if (m - n + 2 * i >= 0) {
      int j = n - 2 * i, k = m - j;
      ret = (ret + 1ll * fac[i + j] * inv[i] % mod * inv[j] % mod *
                       fac[i + j + k - typ] % mod * inv[k] % mod *
                       inv[i + j - typ] % mod) %
            mod;
    }
  return ret;
}
int main() {
  fac[0] = inv[0] = 1;
  for (int i = 1; i < N; i++)
    fac[i] = 1ll * fac[i - 1] * i % mod, inv[i] = qpow(fac[i], mod - 2);
  scanf("%d%d%d", &n, &m, &g);
  n--;
  if (g == 1) n--;
  ans = (cal(n, m, 0) + cal(n + 2, m - 1, 1)) % mod;
  printf("%d", ans);
}
