#include <bits/stdc++.h>
using namespace std;
long long fact[200000 + 4], revFac[200000 + 4];
long long power(long long b, long long p) {
  if (p == 0) return 1;
  long long sq = power(b, p / 2);
  sq = sq * sq;
  sq %= 1000000007;
  if (p % 2 == 1) sq = sq * b;
  sq %= 1000000007;
  return sq;
}
long long comb(int n, int k) {
  if (n == k || k == 0) return 1;
  if (!n || k > n) return 0;
  return fact[n] * revFac[n - k] % 1000000007 * revFac[k] % 1000000007;
}
void computeFact() {
  fact[0] = fact[1] = 1;
  for (int i = 1; i <= 200000; i++) {
    fact[i] = fact[i - 1] * i % 1000000007;
    revFac[i] = power(fact[i], 1000000007 - 2);
  }
}
int main(int argc, const char* argv[]) {
  int n, m, g;
  cin >> n >> m >> g;
  long long ans = 0;
  if (m && !n) {
    if ((g && m > 1) || (!g && 1 == m))
      cout << 0 << endl;
    else if ((g && 1 == m) || (!g && m > 1))
      cout << 1 << endl;
    return 0;
  }
  if (n && !m) {
    if ((!g && (n & 1)) || (g && !(n & 1)))
      cout << 1 << endl;
    else
      cout << 0 << endl;
    return 0;
  }
  if (1 == n && 1 == m) {
    if (g)
      cout << 0 << endl;
    else
      cout << 2 << endl;
    return 0;
  }
  computeFact();
  for (int i = g; i < n; i += 2)
    ans += comb((m + n - i - 1), m - 1), ans %= 1000000007;
  cout << (ans + (int)!((g ^ (1 & n)) ^ (1 == m))) % 1000000007 << endl;
  return 0;
}
