#include <bits/stdc++.h>
using namespace std;
const unsigned int p = 1000000007;
const int maxn = 200000;
int max_n = 3;
vector<int> fix(maxn, 0);
unsigned int modPow(unsigned int a, unsigned int x) {
  long long res = 1, ta = a;
  while (x > 0) {
    if (x & 1) res = (res * ta) % p;
    ta = (ta * ta) % p;
    x >>= 1;
  }
  return (unsigned int)res;
}
unsigned int modInverse(unsigned int a) { return modPow(a, p - 2); }
unsigned int fact(unsigned int a) {
  while (max_n <= a) {
    long long x = fix[max_n - 1];
    x *= max_n;
    x %= p;
    fix[max_n] = x;
    max_n++;
  }
  return fix[a];
}
unsigned int binomial(unsigned int n, unsigned int k) {
  unsigned int numerator = fact(n);
  long long x = ((long long)fact(k) * (long long)fact(n - k)) % p;
  unsigned int denominator = (unsigned int)x;
  long long res = modInverse(denominator);
  res = (res * numerator) % p;
  return (unsigned int)res;
}
unsigned int func(unsigned int n, unsigned int m, unsigned int g) {
  long long rslt = 0;
  for (; g <= n && (m > 1 || g < n); g += 2) {
    rslt += binomial((m + n) - g - 1, n - g);
    if (rslt >= p) rslt %= p;
  }
  return (unsigned int)rslt;
}
unsigned int answerfor(int n, int m, int g) {
  unsigned int rslt = 0;
  if (n == 0) {
    if (m == 1)
      rslt = g;
    else if (m > 1)
      rslt = abs(g - 1);
  } else if (m == 0) {
    rslt = abs(g - (n % 2));
  } else if (n + m >= 2) {
    rslt = func(n, m, g);
    if (m == 1) {
      if (g == 0 && n % 2 == 1)
        rslt += 1;
      else if (g == 1 && n % 2 == 0)
        rslt += 1;
    }
  }
  return rslt;
}
int main(int argc, char** argv) {
  fix[0] = 1;
  fix[1] = 1;
  fix[2] = 2;
  int n, m, g;
  cin >> n >> m >> g;
  unsigned int rslt = answerfor(n, m, g);
  cout << rslt;
  return 0;
}
