#include <bits/stdc++.h>
using namespace std;
long long pow(long long a, int b) {
  if (b == 0) return 1;
  long long tmp = pow(a, b / 2);
  if (b % 2 == 1)
    return (((tmp * tmp) % 1000000007) * a) % 1000000007;
  else
    return (tmp * tmp) % 1000000007;
}
long long fact[200010], invfact[200010];
int main() {
  int n, m, g;
  cin >> n >> m >> g;
  if (n == 0)
    if (m == 1)
      cout << g << endl;
    else
      cout << 1 - g << endl;
  else if (m == 0) {
    if (n % 2 == 1 - g)
      cout << 1 << endl;
    else
      cout << 0 << endl;
  } else {
    long long ans = 0;
    fact[0] = fact[1] = 1;
    invfact[0] = invfact[1] = 1;
    for (int i = 2; i <= n + m; i++) {
      fact[i] = (fact[i - 1] * i) % 1000000007;
      invfact[i] = pow(fact[i], 1000000007 - 2);
    }
    if (m == 1) {
      for (int k = g; k < n; k += 2)
        ans = (ans + ((((fact[n + m - k - 1] * invfact[m - 1]) % 1000000007) *
                       invfact[n - k]) %
                      1000000007)) %
              1000000007;
      if (n % 2 == 1 - g) ans++;
    } else {
      for (int k = g; k <= n; k += 2)
        ans = (ans + ((((fact[n + m - k - 1] * invfact[m - 1]) % 1000000007) *
                       invfact[n - k]) %
                      1000000007)) %
              1000000007;
    }
    cout << ans << endl;
  }
}
