#include <bits/stdc++.h>
using namespace std;
long long fact[200005];
long long mod = 1e9 + 7;
long long quickpow(long long a, int b, long long c) {
  long long s = 1;
  while (b) {
    if (b & 1) s = s * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return s;
}
long long getans(long long a, long long k) {
  return (fact[a] * quickpow(fact[k] * fact[a - k] % mod, mod - 2, mod)) % mod;
}
int main() {
  fact[0] = 1;
  for (int i = (1); i <= (200000); ++i) {
    fact[i] = (fact[i - 1] * i) % mod;
  }
  long long ans;
  int n, m, g;
  while (cin >> n >> m >> g) {
    if (m == 0) {
      printf("%d\n", (n - 1) % 2 == g ? 1 : 0);
      continue;
    }
    if (n == 0) {
      if (g == 1 && m == 1)
        puts("1");
      else if (g == 0 && m > 1)
        puts("1");
      else
        puts("0");
      continue;
    }
    ans = 0;
    for (long long k = (long long)m - 1; k < m + n; k++) {
      if (k == 0) {
        if ((m + n - 1) % 2 != g) ans = (ans + 1) % mod;
      } else if ((m + n - k - 1) % 2 == g)
        ans = (ans + getans(k, m - 1)) % mod;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
