#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
long long int a[200200], inv[200200], c[200200];
long long int q0 = 0, q1 = 0;
long long int qwe(int n, int k) {
  if (k < 0 || n < k || n < 0) return 0;
  long long int ans = 1;
  ans = c[n];
  ans = (ans * a[k]) % mod;
  ans = (ans * a[n - k]) % mod;
  return ans;
}
void check(int n, int m, bool f) {
  if (m == 0) {
    if (f)
      q0++;
    else
      q1++;
  } else {
    if (m % 2 == 1)
      if (f)
        q0++;
      else
        q1++;
    else if (f)
      q1++;
    else
      q0++;
  }
}
void solve(int m, int n, int k) {
  int i, j, x, y, z = 0, lc, lv, tw, th;
  inv[1] = 1;
  a[0] = 1;
  a[1] = 1;
  c[1] = 1;
  c[0] = 1;
  for (i = 2; i <= 200000; i++) {
    inv[i] = (mod * mod - (mod / i) * inv[mod % i]) % mod;
    a[i] = (a[i - 1] * inv[i]) % mod;
    c[i] = (c[i - 1] * i) % mod;
  }
  q0 = 0, q1 = 0;
  for (i = 0; i < 1e6 && m >= 0; i++) {
    if (n > 0 && m + m > 1) {
      q0 = (q0 + qwe(n + m - 1, n - 1)) % mod;
      m--;
      if (n > 0 && m + n > 1) {
        q1 = (q1 + qwe(n + m - 1, n - 1)) % mod;
        m--;
      } else if (n == 1) {
        check(n, m, true);
        i = 1e6;
      } else {
        check(n, m, true);
        i = 1e6;
      }
    } else if (n == 1) {
      q1++;
      i = 1e6;
    } else {
      check(n, m, true);
      i = 1e6;
    }
  }
  if (k == 0)
    printf("%I64d\n", q0 % mod);
  else
    printf("%I64d\n", q1 % mod);
}
int main() {
#pragma comment(linker, "/STACK:268435456")
  int n, m, k;
  while (scanf("%d%d%d", &n, &m, &k) != EOF) solve(n, m, k);
  return 0;
}
