#include <bits/stdc++.h>
using namespace std;
const int N = 210000;
const int P = 1e9 + 7;
template <class T>
inline T euclid(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclid(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclid(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclid(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <class T>
inline T checkmod(T n, T m) {
  return (n % m + m) % m;
}
template <class T>
T modDivide(T a, T b, T p) {
  T x, y, g;
  g = euclid(b, p, x, y);
  if (a % g) return -1;
  return a / g * checkmod(x, p) % p;
}
int add(int a, int b) { return (a + b) % P; }
int mul(int a, int b) { return (long long)a * b % P; }
int fac[N];
int rev[N];
void pre() {
  fac[0] = 1;
  rev[0] = 1;
  for (int i = 1; i < N; i++) {
    fac[i] = mul(fac[i - 1], i);
    rev[i] = modDivide(1, fac[i], P);
    if ((long long)fac[i] * rev[i] % P != 1)
      while (1)
        ;
  }
}
int C(int n, int m) {
  int r = fac[n];
  r = mul(r, rev[m]);
  r = mul(r, rev[n - m]);
  return r;
}
int main() {
  pre();
  int n, m, g;
  scanf("%d%d%d", &n, &m, &g);
  if (m == 0) {
    printf("%d\n", n % 2 != g);
    return 0;
  }
  int l = n + m;
  int ans = 0;
  if (g == 0) {
    for (int i = 1; i < l; i += 2) {
      if (i - 1 > n) break;
      ans = add(ans, C(l - i, m - 1));
    }
  } else {
    for (int i = 2; i < l; i += 2) {
      if (i - 1 > n) break;
      ans = add(ans, C(l - i, m - 1));
    }
  }
  if (m == 1 && n % 2 != g) ans = add(ans, 1);
  printf("%d\n", ans);
  return 0;
}
