#include <bits/stdc++.h>
using namespace std;
long long n, m, k, ans;
long long fact[200003];
long long CalcPow(long long x, long long y) {
  long long res = 1;
  for (long long i = 1, val = x; i <= y; i <<= 1) {
    if (y & i) res = (res * val) % 1000000007;
    val = (val * val) % 1000000007;
  }
  return res;
}
long long CalcComb(long long x, long long y) {
  long long Div = (fact[y] * fact[x - y]) % 1000000007;
  return (fact[x] * CalcPow(Div, 1000000007 - 2)) % 1000000007;
}
int main() {
  scanf("%I64d%I64d%I64d", &n, &m, &k);
  if (n == 0) {
    if (m == 1 && k == 1) ans = 1;
    if (m >= 2 && k == 0) ans = 1;
    printf("%I64d\n", ans);
    return 0;
  }
  if (m == 0) {
    if (n % 2 == 1 && k == 0) ans = 1;
    if (n % 2 == 0 && k == 1) ans = 1;
    printf("%I64d\n", ans);
    return 0;
  }
  fact[0] = 1;
  for (long long i = 1; i <= n + m; i++)
    fact[i] = (fact[i - 1] * i) % 1000000007;
  if (k == 0) ans = CalcComb(n + m - 1, n);
  for (long long i = 1; i < n; i++) {
    if (i % 2 == 1 && k == 1)
      ans = (ans + CalcComb(n - i + m - 1, m - 1)) % 1000000007;
    if (i % 2 == 0 && k == 0)
      ans = (ans + CalcComb(n - i + m - 1, m - 1)) % 1000000007;
  }
  if (m == 1) {
    if (n % 2 == 1 && k == 0) ans = (ans + 1) % 1000000007;
    if (n % 2 == 0 && k == 1) ans = (ans + 1) % 1000000007;
  }
  if (m >= 2) {
    if (n % 2 == 1 && k == 1) ans = (ans + 1) % 1000000007;
    if (n % 2 == 0 && k == 0) ans = (ans + 1) % 1000000007;
  }
  printf("%I64d\n", ans);
  return 0;
}
