#include <bits/stdc++.h>
using namespace std;
int n, m, g;
long long mpow(long long a, long long b, long long m) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans *= a;
      ans %= m;
    }
    a = (a * a) % m;
    b >>= 1;
  }
  return ans;
}
long long fac[2 * 100010];
long long ifac[2 * 100010];
void init() {
  fac[0] = 1;
  ifac[0] = 1;
  for (int i = 1; i < 2 * 100010; i++) {
    fac[i] = (fac[i - 1] * i) % 1000000007;
    ifac[i] = (ifac[i - 1] * mpow(i, 1000000007 - 2, 1000000007)) % 1000000007;
  }
  return;
}
void solve() {
  long long ans = 0;
  if (m == 0) {
    if (n % 2 != g) {
      cout << "1\n";
      return;
    } else {
      cout << "0\n";
      return;
    }
  }
  if (n == 0) {
    if (m > 1) {
      if (g == 0) {
        cout << "1\n";
        return;
      } else {
        cout << "0\n";
        return;
      }
    } else {
      if (g == 1) {
        cout << "1\n";
        return;
      } else {
        cout << "0\n";
        return;
      }
    }
  }
  if (g == 0) {
    for (int i = 0; i <= n; i += 2) {
      int qt = n - i + m - 1;
      int qt1 = n - i;
      int qt2 = m - 1;
      if (qt > 0 and qt2 >= 0 and qt1 >= 0) {
        ans += (((fac[qt] * ifac[qt1]) % 1000000007) * ifac[qt2]) % 1000000007;
        ans %= 1000000007;
      }
      if (i + 1 == n and m == 1) {
        ans += 1;
        ans %= 1000000007;
      }
    }
  } else {
    for (int i = 1; i <= n; i += 2) {
      int qt = n - i + m - 1;
      int qt1 = n - i;
      int qt2 = m - 1;
      if (qt > 0 and qt2 >= 0 and qt1 >= 0) {
        ans += (((fac[qt] * ifac[qt1]) % 1000000007) * ifac[qt2]) % 1000000007;
        ans %= 1000000007;
      }
      if (i + 1 == n and m == 1) {
        ans += 1;
        ans %= 1000000007;
      }
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  init();
  cin >> n >> m >> g;
  solve();
  return 0;
}
