#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int N = 200010;
const int M = 2000010;
const int mod = 1e9 + 7;
const long long inf = 0x3f3f3f3f3f3f3f3fll;
const double eps = 1e-6;
using namespace std;
int n, m, g;
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 p[N];
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(int a, int b, int c) {
  if (a + b == 1) {
    if (a) return c == 0;
    return c == 1;
  }
  if (c == 1) {
    if (a == 0) return 0;
    return dfs(a - 1, b, 0);
  }
  long long ret = 0;
  if (a) ret += dfs(a - 1, b, 1);
  if (b) ret += com(a + b - 1, a);
  ret %= mod;
  return ret;
}
int main() {
  p[0] = 1;
  for (int i = 1; i < N; i++) p[i] = p[i - 1] * i % mod;
  scanf("%d%d%d", &n, &m, &g);
  cout << dfs(n, m, g) << endl;
  return 0;
}
