#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long fact[200101];
long long fastmod(long long a, long long k) {
  long long b = 1;
  while (k) {
    if (k & 1) b = a * b % MOD;
    a = (a % MOD) * (a % MOD) % MOD;
    k = k / 2;
  }
  return b;
}
long long comb(int n, int m) {
  long long ans, a;
  ans = fact[n];
  a = fastmod((fact[n - m] * fact[m]) % MOD, MOD - 2);
  return (ans * a) % MOD;
}
int main() {
  int i, n, m, g;
  long long ans, res;
  scanf("%d%d%d", &n, &m, &g);
  if (m == 0) {
    if (n % 2 == 0) {
      printf("%d\n", g);
    } else {
      printf("%d\n", !g);
    }
    return 0;
  }
  if (n == 0) {
    if (m == 1 && g == 1)
      printf("1\n");
    else if (m == 1 && g == 0)
      printf("0\n");
    else if (m > 1 && g == 0)
      printf("1\n");
    else
      printf("0\n");
    return 0;
  }
  fact[0] = 1;
  for (i = 1; i <= n + m; i++) {
    fact[i] = (fact[i - 1] * i) % MOD;
  }
  ans = comb(n + m, n);
  res = 0;
  for (i = 1; i <= n; i += 2) {
    if (m == 0) break;
    if (i + 1 == n + m) break;
    res = (res + comb(n + m - i - 1, m - 1)) % MOD;
  }
  if (m == 1 && n % 2 == 0) res++;
  if (g == 1)
    printf("%I64d\n", res);
  else {
    ans = (ans - res + MOD) % MOD;
    printf("%I64d\n", ans);
  }
  return 0;
}
