#include <bits/stdc++.h>
using namespace std;
int n, m, g, f[200500 + 5], r[200500 + 5], res;
int pow(int x, int y) {
  int res = 1;
  while (y) {
    if (y % 2 == 1) res = ((long long)(res)*x) % 1000000007;
    x = ((long long)(x)*x) % 1000000007;
    y /= 2;
  }
  return res;
}
int C(int k, int n) {
  int res = ((long long)f[n]) * r[k] % 1000000007;
  res = ((long long)res) * r[n - k] % 1000000007;
  return res;
}
int main() {
  cin >> n >> m >> g;
  f[0] = 1;
  for (int i = 1; i <= 200500; i++)
    f[i] = (((long long)f[i - 1]) * i) % 1000000007;
  for (int i = 0; i <= 200500; i++) r[i] = pow(f[i], 1000000007 - 2);
  if (m == 0) {
    printf("%d\n", n % 2 == 1 - g);
    return 0;
  }
  for (int i = g; i <= n; i += 2)
    if (i + 1 < n + m) res = (res + C(n - i, n + m - i - 1)) % 1000000007;
  if ((n % 2 != g) && (m == 1)) res++;
  printf("%d\n", res);
}
