#include <bits/stdc++.h>
using namespace std;
const int N = 200009;
const long long mod = 1e9 + 7;
long long n, m, g;
long long p[N];
long long pow(long long a, long long b, long long c) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return ret;
}
long long com(int n, int m) {
  long long ret = 1;
  ret = (ret * p[n]) % mod;
  ret = (ret * pow(p[m], mod - 2, mod)) % mod;
  ret = (ret * pow(p[n - m], mod - 2, mod)) % mod;
  return ret;
}
long long dfs(long long x, long long y, long long g) {
  if (x == 0 && y == 0) return 1;
  if (x + y == 1) {
    if (x && g == 0) return 1;
    if (y && g == 1) return 1;
    return 0;
  }
  if (g == 1) {
    if (x == 0) return 0;
    return dfs(x - 1, y, 0) % mod;
  } else {
    long long ans = 0;
    if (y) {
      ans += com(x - 1 + y, x);
    }
    if (x) {
      return (ans + dfs(x - 1, y, 1)) % mod;
    } else
      return ans;
  }
}
int main() {
  p[0] = 1;
  for (int i = 1; i < N; i++) p[i] = p[i - 1] * i % mod;
  cin >> n >> m >> g;
  cout << dfs(n, m, g) << endl;
  return 0;
}
