#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
const int MX = 200500;
long long f[MX];
long long f1[MX];
int pow_mod(long long a, int st) {
  a %= mod;
  long long res = 1;
  while (st) {
    if (st & 1) {
      res *= a;
      res %= mod;
    }
    a *= a;
    a %= mod;
    st >>= 1;
  }
  return res;
}
void init() {
  f[0] = 1;
  for (int i = 1; i < MX; i++) {
    f[i] = f[i - 1] * i;
    f[i] %= mod;
  }
  f1[MX - 1] = pow_mod(f[MX - 1], mod - 2);
  for (int i = MX - 2; i >= 0; i--) {
    f1[i] = f1[i + 1] * (i + 1);
    f1[i] %= mod;
  }
}
int c(int n, int k) {
  long long res = f[n] * f1[k];
  res %= mod;
  res *= f1[n - k];
  return res % mod;
}
int go1(int, int);
int go0(int c0, int c1) {
  if (c0 < 0 || c1 < 0) return 0;
  if (c0 == 1 && c1 == 0) return 1;
  if (c0 == 0 && c1 == 1) return 0;
  int ans = 0;
  if (c1) ans = c(c0 + c1 - 1, c0);
  if (c0) ans += go1(c0 - 1, c1);
  return ans % mod;
}
int go1(int c0, int c1) {
  if (c0 == 0 && c1 == 1) return 1;
  return go0(c0 - 1, c1);
}
int main() {
  init();
  ios_base::sync_with_stdio(false);
  int n, m, g;
  cin >> n >> m >> g;
  if (g)
    cout << go1(n, m) << endl;
  else
    cout << go0(n, m) << endl;
  return 0;
}
