#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
const long long mod = 1000000007;
long long n, m, g, jc[200010], inv[200010], ans;
inline long long fpow(long long n, long long p) {
  n %= mod;
  long long ans = 1, base = n;
  while (p) {
    if (p & 1) ans = ans * base % mod;
    base = base * base % mod;
    p >>= 1;
  }
  return ans;
}
inline long long C(long long n, long long m) {
  return jc[n] * inv[n - m] % mod * inv[m] % mod;
}
signed main() {
  n = read();
  m = read();
  g = read();
  jc[0] = 1;
  for (long long i = 1; i <= n + m; ++i) jc[i] = jc[i - 1] * i % mod;
  inv[n + m] = fpow(jc[n + m], mod - 2);
  for (long long i = n + m - 1; i >= 0; --i)
    inv[i] = inv[i + 1] * (i + 1) % mod;
  if (!n) return printf("%lld", m == 1 ? g : g ^ 1) & 0;
  if (!m) return printf("%lld", n & 1 ? g ^ 1 : g) & 0;
  if (g) {
    for (long long i = 1; i <= n; i += 2)
      ans = (ans + C(n + m - i - 1, m - 1)) % mod;
    if (m == 1) {
      if (n & 1)
        ans = (ans - 1 + mod) % mod;
      else
        ans = (ans + 1) % mod;
    }
  } else {
    for (long long i = 0; i <= n; i += 2)
      ans = (ans + C(n + m - i - 1, m - 1)) % mod;
    if (m == 1) {
      if (n & 1)
        ans = (ans + 1) % mod;
      else
        ans = (ans - 1 + mod) % mod;
    }
  }
  printf("%lld", ans);
  return 0;
}
