#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
long long fat[200010], inv[200010];
long long expo(long long a, long long b) {
  long long x = 1, y = a;
  while (b) {
    if (b & 1LL) x = (x * y) % mod;
    y = (y * y) % mod;
    b >>= 1;
  }
  return x;
}
int main() {
  int n, m, g;
  scanf("%d%d%d", &n, &m, &g);
  if (n + m == 1) {
    if (n)
      printf("%d\n", (g == 0));
    else
      printf("%d\n", (g == 1));
    return 0;
  }
  if (!n) {
    printf("%d\n", (g == 0));
    return 0;
  }
  if (!m) {
    if (n % 2)
      printf("%d\n", (g == 0));
    else
      printf("%d\n", (g == 1));
    return 0;
  }
  long long ans = 0LL;
  if (m == 1) {
    if (!g) {
      for (int i = 0; i < n; i += 2) ans++;
      if (n % 2) ans++;
    } else {
      for (int i = 1; i < n; i += 2) ans++;
      if (n % 2 == 0) ans++;
    }
    printf("%lld\n", ans);
    return 0;
  }
  fat[0] = inv[0] = 1LL;
  for (int i = 1; i <= n + m; i++) {
    fat[i] = (fat[i - 1] * (long long)(i)) % mod;
    inv[i] = expo(fat[i], mod - 2LL);
  }
  if (!g) {
    for (int i = 0; i <= n; i += 2)
      ans = (ans +
             (fat[n + m - i - 1] * ((inv[n - i] * inv[m - 1]) % mod)) % mod) %
            mod;
  } else {
    for (int i = 1; i <= n; i += 2)
      ans = (ans +
             (fat[n + m - i - 1] * ((inv[n - i] * inv[m - 1]) % mod)) % mod) %
            mod;
  }
  printf("%lld\n", ans);
  return 0;
}
