#include <bits/stdc++.h>
using namespace std;
int ar[1000003];
char str[1000003];
long long int fac[800002];
long long int inv[800002];
long long int power(long long int n, long long int x) {
  long long int result = 1;
  while (x > 0) {
    if (x & 1) result = ((result) * (n)) % 1000000007;
    x = x >> 1;
    n = ((n) * (n)) % 1000000007;
  }
  return result;
}
long long int ncr(int n, int r) {
  long long int ans1, ans2, ans3, ans4;
  ans1 = fac[n];
  ans2 = inv[r];
  ans3 = inv[n - r];
  ans4 = (ans1 * ((ans2 * ans3) % 1000000007)) % 1000000007;
  return ans4;
}
int main() {
  long long ans, anstemp, anstot, ans1, ans2, tot;
  int n, m, g;
  fac[0] = 1;
  inv[0] = 1;
  for (int i = 1; i <= 800000; i++) {
    fac[i] = (fac[i - 1] * i) % 1000000007;
    inv[i] = power(fac[i], 1000000007 - 2);
  }
  scanf("%d %d %d", &n, &m, &g);
  if (n == 1 && m == 1 && g == 0) {
    ans = 2;
  } else if (n == 1 && m == 1 && g == 1) {
    ans = 0;
  } else if (n == 0 && m == 1) {
    if (g == 0)
      ans = 0;
    else
      ans = 1;
  } else if (m == 0 && n == 1) {
    if (g == 0)
      ans = 1;
    else
      ans = 0;
  } else if (n == 0 && m > 0 && g == 0) {
    ans = 1;
  } else if (n == 0 && m > 0 && g == 1) {
    ans = 0;
  } else if (m == 0 && n > 0 && g == 0) {
    if ((n % 2) == 1)
      ans = 1;
    else
      ans = 0;
  } else if (m == 0 && n > 0 && g == 1) {
    if ((n % 2) == 1)
      ans = 0;
    else
      ans = 1;
  } else {
    long long finalans = ncr(n + m, m);
    ans = 0;
    for (int i = 0; i <= n; i = i + 2) {
      int tot = n + m - i - 1;
      if (tot > 0) ans = ans + ncr(tot, m - 1);
      ans = ans % 1000000007;
    }
    if (m == 1 && (n & 1) == 1) ans++;
    if (g == 1) {
      ans = (finalans - ans + 1000000007) % 1000000007;
    }
  }
  cout << ans << "\n";
  return 0;
}
