#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int maxn = 2e5 + 5;
long long fact[maxn + 5];
void precalc() {
  fact[0] = 1;
  for (int j = (int)1; j <= (int)maxn; j++)
    fact[j] = (fact[j - 1] * (long long)j) % MOD;
}
long long binpow(long long x, int p) {
  if (p == 0) return 1;
  long long y = binpow(x, p / 2);
  y = y * y % MOD;
  if (p & 1) return (y * x) % MOD;
  return y;
}
long long rev(long long x) { return binpow(x, MOD - 2); }
long long getC(int n, int k) {
  return (((fact[n] * rev(fact[k])) % MOD) * rev(fact[n - k])) % MOD;
}
long long get(int n, int m) {
  if (n < 0 || m < 0) return 0;
  long long answer = 0;
  for (int second_type = (int)0; second_type <= (int)m; second_type++) {
    int third_type = m - second_type;
    int zeros_left = n - third_type;
    if (zeros_left >= 0 && zeros_left % 2 == 0) {
      int first_type = zeros_left / 2;
      int total = first_type + second_type + third_type;
      long long to_add =
          getC(total, first_type) * getC(total - first_type, second_type) % MOD;
      answer = (answer + to_add) % MOD;
    }
  }
  return answer;
}
int main() {
  precalc();
  int n, m, g;
  scanf("%d%d%d", &n, &m, &g);
  if (n == 1 && m == 0) {
    if (g == 0)
      printf("1");
    else
      printf("0");
    exit(0);
  }
  if (n == 0 && m == 1) {
    if (g == 1)
      printf("1");
    else
      printf("0");
    exit(0);
  }
  if (g == 1) {
    n--;
  }
  n--;
  long long general = get(n, m);
  long long specific_1 = get(n, m - 1);
  long long specific_2 = get(n + 1, m - 2);
  long long answer = (general + specific_1 + specific_2) % MOD;
  cout << answer << endl;
  return 0;
}
