#include <bits/stdc++.h>
using ll = long long;
const int C = 200001, M = 1000000007;
std::pair<ll, ll> Euclid(ll a, ll b) {
  int x1 = 0, x2 = 1, y1 = 1, y2 = 0, q = a / b, r = a - q * b, x, y, wynn;
  x = 1, y = y2 - (q - 1) * y1;
  while (r != 0) {
    a = b, b = r;
    x = x2 - q * x1, x2 = x1, x1 = x;
    y = y2 - q * y1, y2 = y1, y1 = y;
    wynn = r, q = a / b, r = a - q * b;
  }
  return std::make_pair(x, y);
}
ll invert(ll a, ll M) {
  ll x = Euclid(a, M).first;
  if (x < 0) return x + M;
  return x;
}
ll fac[C], afac[C];
inline ll cn(int n, int k) {
  if (k < 0 || n < 0) return 0;
  return (((fac[n] * afac[k]) % M) * afac[n - k]) % M;
}
int main() {
  int starter = 0, n, m, g, zeros, i;
  ll res = 0;
  fac[0] = 1;
  for (i = 1; i < C; i++) fac[i] = (fac[i - 1] * i) % M;
  for (i = 0; i < C; i++) afac[i] = invert(fac[i], M);
  scanf("%d %d %d", &n, &m, &g);
  for (zeros = 0; zeros <= n; zeros++) {
    if (starter == g && zeros + 1 < n + m)
      res = (res + cn(n + m - zeros - 1, m - 1)) % M;
    if (starter != g && n == zeros && m == 1) res = (res + 1) % M;
    if (starter == g && n == zeros + 1 && m == 0) res = (res + 1) % M;
    starter = 1 - starter;
  }
  printf("%lld\n", res);
  return 0;
}
