#include <bits/stdc++.h>
using namespace std;
long long fact[200005];
long long inv(long long a, int pow) {
  if (pow == 1) return a;
  long long val = inv(a, pow / 2);
  val = (val * val) % 1000000007;
  if (pow & 1) val = (val * a) % 1000000007;
  return val;
}
long long calc(int n, int m) {
  if (n < 0 || m < 0) return 0;
  if (n + m == 0) return 0;
  if (n == 0 || m == 0) return 1;
  long long den = (fact[n] * fact[m]) % 1000000007;
  return (fact[n + m] * inv(den, 1000000007 - 2)) % 1000000007;
}
void doit() {
  int n, m, g;
  long long ret = 0;
  cin >> n >> m >> g;
  fact[0] = fact[1] = 1;
  for (int i = 2; i < 200005; i++) fact[i] = (fact[i - 1] * i) % 1000000007;
  if (m == 0 || m == 1) {
    if ((n & 1) != (g & 1))
      ret = 1;
    else
      ret = 0;
  }
  if (g) {
    for (int i = 1; i <= n; i += 2) {
      ret = (ret + calc(n - i, m - 1)) % 1000000007;
    }
  } else {
    for (int i = 0; i <= n; i += 2)
      ret = (ret + calc(n - i, m - 1)) % 1000000007;
  }
  cout << ret << endl;
  return;
}
int main() {
  doit();
  return 0;
}
