#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 10;
long long fact[maxn], rfact[maxn];
long long cmb(long long a, long long b) {
  if (b > a) return 0;
  long long t = fact[a] * rfact[b];
  t %= ((long long)1e9 + 7);
  t = t * rfact[a - b];
  return t % ((long long)1e9 + 7);
}
long long po(long long a, long long b) {
  if (b == 0) return 1;
  long long t = po(a, b / 2);
  t = (t * t) % ((long long)1e9 + 7);
  if (b & 1) t = (t * a) % ((long long)1e9 + 7);
  return t;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  fact[0] = 1;
  for (int i = 1; i < maxn; i++)
    fact[i] = (fact[i - 1] * i) % ((long long)1e9 + 7);
  for (int i = 0; i < maxn; i++)
    rfact[i] = po(fact[i], ((long long)1e9 + 7) - 2);
  long long n, m, g, ans = 0;
  cin >> n >> m >> g;
  if (!m) {
    cout << (((n & 1) ^ !(g & 1) ? 0 : 1));
    return 0;
  }
  for (int i = 0; i < m + n - 1; i++) {
    if ((i & 1) == g) {
      ans = ((ans + cmb(m + n - i - 1, m - 1)) % ((long long)1e9 + 7));
    }
  }
  if (((n + m - 1) % 2) != g && m == 1) ans++;
  ans %= ((long long)1e9 + 7);
  cout << ans;
}
