#include <bits/stdc++.h>
using namespace std;
const int M = 200000 + 10;
long long int mod = 1000000007;
long long int fac[M];
long long int fastexp(long long int a, long long int n) {
  long long int ans = 1;
  while (n > 0) {
    if (n & 1) {
      ans = (ans * a) % mod;
    }
    n = n / 2;
    a = (a * a) % mod;
  }
  return ans;
}
int main() {
  int n, m, g;
  cin >> n >> m >> g;
  fac[0] = 1;
  for (int i = 1; i < M; i++) {
    fac[i] = (fac[i - 1] * i) % mod;
  }
  if (n == 0) {
    if (m == 1) {
      cout << g << endl;
    } else {
      cout << 1 - g << endl;
    }
  } else {
    if (m == 0) {
      if (n % 2 == 0) {
        if (g == 1) {
          cout << 1 << endl;
        } else {
          cout << 0 << endl;
        }
      } else {
        if (g == 0) {
          cout << 1 << endl;
        } else {
          cout << 0 << endl;
        }
      }
    } else {
      if (n == 1 && m == 1) {
        if (g == 0) {
          cout << 2 << endl;
        } else {
          cout << 0 << endl;
        }
      } else {
        if (g == 0) {
          long long int ans = 0;
          long long int u1 = fac[n + m - 1];
          long long int d1 = fac[n];
          long long int d2 = fac[m - 1];
          long long int d = (d1 * d2) % mod;
          long long int revd = fastexp(d, mod - 2);
          long long int res = (u1 * revd) % mod;
          ans = ans + res;
          for (int i = 2; i <= n; i += 2) {
            u1 = fac[n + m - (i + 1)];
            d1 = fac[n - i];
            d2 = fac[m - 1];
            d = (d1 * d2) % mod;
            revd = fastexp(d, mod - 2);
            res = (u1 * revd) % mod;
            if (n + m - (i + 1) >= 1) {
              ans = ans + res;
              ans = ans % mod;
            }
          }
          if (n % 2 == 1 && m == 1) {
            ans = (ans + 1) % mod;
          }
          cout << ans << endl;
        } else {
          long long int ans = 0;
          for (int i = 1; i <= n; i += 2) {
            long long int u1 = fac[n + m - (i + 1)];
            long long int d1 = fac[n - i];
            long long int d2 = fac[m - 1];
            long long int d = (d1 * d2) % mod;
            long long int revd = fastexp(d, mod - 2);
            long long int res = (u1 * revd) % mod;
            if (n + m - (i + 1) >= 1) {
              ans = ans + res;
              ans = ans % mod;
            }
          }
          if (n % 2 == 0 && m == 1) {
            ans = (ans + 1) % mod;
          }
          cout << ans << endl;
        }
      }
    }
  }
  return 0;
}
