#include <bits/stdc++.h>
using namespace std;
vector<int> bV;
const long long MOD = 1000000007;
const int MAXN = 200010;
long long F[MAXN], I[MAXN];
long long bigMod(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long ret = bigMod(a, b / 2);
    return (ret * ret) % MOD;
  }
  return (a * bigMod(a, b - 1)) % MOD;
}
void precal() {
  F[0] = 1;
  for (int i = 1; i < MAXN; i++) {
    F[i] = (F[i - 1] * i) % MOD;
  }
  I[0] = bigMod(1, MOD - 2);
  for (int i = 1; i < MAXN; i++) {
    I[i] = (I[i - 1] * bigMod(i, MOD - 2)) % MOD;
  }
}
long long nCr(int n, int r) {
  long long ret = (F[n] * I[n - r]) % MOD;
  return (ret * I[r]) % MOD;
}
long long memo[MAXN][2];
long long doit(int n, const int &m, int f) {
  if (n + m == 1) {
    if (f) return (m == 1);
    return (n == 1);
  }
  long long &ret = memo[n][f];
  if (ret != -1) return ret;
  ret = 0;
  if (f) {
    long long cur = doit(n, m, !f);
    long long total = nCr(n + m, n);
    cur = (total - cur);
    cur = ((cur % MOD) + MOD) % MOD;
    ret += cur;
    ret %= MOD;
  } else {
    if (m) {
      ret += nCr(n + m - 1, n);
      ret %= MOD;
    }
    if (n) {
      ret += doit(n - 1, m, 1);
      ret %= MOD;
    }
  }
  return ret;
}
int main() {
  precal();
  int n, m, g;
  cin >> n >> m >> g;
  memset(memo, -1, sizeof(memo));
  long long ret = doit(n, m, g);
  cout << ret << endl;
  return 0;
}
