#include <bits/stdc++.h>
using namespace std;
int n, m, g;
long long fact[200005], factinv[200005];
long long power(int n, int p) {
  if (p == 0) return 1;
  if (p == 1) return n;
  if (p & 1) return power(n, p - 1) * n % 1000000007;
  long long z = power(n, p / 2);
  return z * z % 1000000007;
}
long long C(int n, int k) {
  if (k == 0) return 1;
  if (n < k) return 0;
  long long ans = fact[n];
  ans = ans * factinv[k] % 1000000007;
  ans = ans * factinv[n - k] % 1000000007;
  return ans;
}
long long f(int n, int m, int g) {
  if (n == 1 and m == 0) return g == 0;
  if (n == 0) {
    if (m == 1)
      return g == 1;
    else
      return g == 0;
  }
  if (g == 0) {
    return (C(n + m - 1, n) + f(n - 1, m, 1)) % 1000000007;
  } else {
    return f(n - 1, m, 0);
  }
}
int main() {
  fact[0] = 1;
  for (int i = 1; i < 200005; i++) fact[i] = fact[i - 1] * i % 1000000007;
  factinv[0] = 1;
  factinv[1] = 1;
  for (int i = 2; i < 200005; i++)
    factinv[i] = factinv[i - 1] * power(i, 1000000005) % 1000000007;
  cin >> n >> m >> g;
  cout << f(n, m, g) << endl;
  return 0;
}
