#include <bits/stdc++.h>
using namespace std;
long long jie[200005];
void gcd(long long a, long long b, long long &d, long long &x, long long &y) {
  if (!b) {
    d = a;
    x = 1;
    y = 0;
  } else {
    gcd(b, a % b, d, y, x);
    y -= x * (a / b);
  }
}
long long ni(long long x) {
  long long t1, t2, res;
  gcd(x, 1000000007, t1, res, t2);
  return res;
}
long long calc(int a, int b) {
  return jie[a] * ni(jie[b]) % 1000000007 * ni(jie[a - b]) % 1000000007;
}
int main() {
  int i, n, m, g, tn, tm;
  scanf("%d%d%d", &n, &m, &g);
  if (n == 0) {
    if (m == 1) {
      if (g)
        printf("1\n");
      else
        printf("0\n");
    } else {
      if (g)
        printf("0\n");
      else
        printf("1\n");
    }
    return 0;
  }
  if (m == 0) {
    if (n % 2) {
      if (g)
        printf("0\n");
      else
        printf("1\n");
    } else {
      if (g)
        printf("1\n");
      else
        printf("0\n");
    }
    return 0;
  }
  tn = n;
  tm = m;
  jie[0] = jie[1] = 1;
  for (i = 2; i <= m + n; ++i) jie[i] = jie[i - 1] * i % 1000000007;
  long long ans = 0;
  if ((n % 2 == 0 && m >= 2) || (n % 2 == 1 && m == 1)) ans++;
  m--;
  while (n > 0) {
    ans += calc(n + m, n);
    while (ans < 0) ans += 1000000007;
    ans %= 1000000007;
    n -= 2;
  }
  if (g == 0)
    printf("%I64d\n", ans);
  else {
    long long temp = calc(tn + tm, tn) - ans;
    while (temp < 0) temp += 1000000007;
    temp %= 1000000007;
    printf("%I64d\n", temp);
  }
  return 0;
}
