#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long fact[200009], rfact[200009];
long long mgml(long long a, int b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return res;
}
long long C(int n, int m) {
  return fact[n] * rfact[m] % MOD * rfact[n - m] % MOD;
}
long long solve(int one, int zero, int g) {
  long long ans = 0;
  if (g == 0) {
    if (one + zero == 1) {
      if (one)
        return 0;
      else
        return 1;
    } else {
      if (one) ans = C(one + zero - 1, zero);
      if (zero) ans = (ans + solve(one, zero - 1, 1));
      return ans % MOD;
    }
  } else {
    if (one + zero == 1) {
      if (one)
        return 1;
      else
        return 0;
    } else {
      if (!zero)
        return 0;
      else
        return solve(one, zero - 1, 0);
    }
  }
}
int main() {
  fact[0] = rfact[0] = 1;
  for (int i = 1; i < 200009; i++) {
    fact[i] = fact[i - 1] * i % MOD;
    rfact[i] = mgml(fact[i], MOD - 2);
  }
  int n, m, g;
  cin >> n >> m >> g;
  printf("%I64d\n", solve(m, n, g) % MOD);
  return 0;
}
