#include <bits/stdc++.h>
using namespace std;
const double eps(1e-8);
const long long mod = 1e9 + 7;
int n, m, g;
long long fac[200010];
void lln() {
  fac[0] = fac[1] = 1;
  for (int i = 2; i <= 200000; i++) fac[i] = fac[i - 1] * i % mod;
  return;
}
long long quick_pow(long long base, long long pow) {
  long long ret = 1;
  while (pow) {
    if (pow & 1) ret = (ret * base) % mod;
    base = base * base % mod;
    pow >>= 1;
  }
  return ret;
}
long long C(int r, int k) {
  return fac[r] * quick_pow(fac[k] * fac[r - k] % mod, mod - 2LL) % mod;
}
int main() {
  scanf("%d %d %d", &n, &m, &g);
  if (n == 0) {
    if (g == 0) {
      if (m == 1)
        printf("0\n");
      else
        printf("1\n");
    } else {
      if (m == 1)
        printf("1\n");
      else
        printf("0\n");
    }
    return 0;
  }
  if (m == 0) {
    if (g == 0) {
      if (n & 1)
        printf("1\n");
      else
        printf("0\n");
    } else {
      if (n & 1)
        printf("0\n");
      else
        printf("1\n");
    }
    return 0;
  }
  lln();
  long long all = C(n + m, n);
  long long ans = 0;
  for (int t = 0; t <= n; t += 2) ans = (ans + C(n + m - 1 - t, m - 1)) % mod;
  if (m == 1 && (n & 1) == 0) ans = (ans - 1 + mod) % mod;
  if (m == 1 && (n & 1)) ans = (ans + 1) % mod;
  if (g == 0)
    printf("%I64d\n", ans);
  else
    printf("%I64d\n", (all - ans + mod) % mod);
  return 0;
}
