#include <bits/stdc++.h>
using namespace std;
long long n, m, g, fact[2000000];
long long rem, lsig, ans;
long long pw(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2) return a * pw(a, b - 1) % 1000000007;
  return pw(a * a % 1000000007, b / 2);
}
long long inv(long long x) { return pw(x, 1000000007 - 2); }
long long gc(long long n, long long m) {
  long long res = fact[n];
  res *= inv(fact[m]);
  res %= 1000000007;
  res *= inv(fact[n - m]);
  return res % 1000000007;
}
int main() {
  ios_base::sync_with_stdio(0);
  fact[1] = 1;
  fact[0] = 1;
  for (int i = 2; i <= 1000000; i++) fact[i] = fact[i - 1] * i % 1000000007;
  cin >> n >> m >> g;
  for (int stp = 0; stp < n + m; stp++) {
    if (stp > n) continue;
    rem = n - stp;
    rem += m - 1;
    if (m == 0) continue;
    lsig = (stp % 2 != 0);
    if (stp == n + m - 1) {
      lsig = 1 - lsig;
    }
    if (lsig != g) continue;
    ans += gc(rem, n - stp);
    ans %= 1000000007;
  }
  if (m == 0) {
    lsig = 1 - (n % 2);
    if (lsig == g) ++ans;
  }
  cout << ans % 1000000007 << endl;
  cin.get();
  cin.get();
  return 0;
}
