#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007, N = 200005;
int Egcd(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  int d, tp;
  d = Egcd(b, a % b, x, y);
  tp = x;
  x = y;
  y = tp - a / b * y;
  return d;
}
int fac[N], ni[N];
inline int mul(int a, int b) {
  if (a < 0) a += mod;
  if (b < 0) b += mod;
  long long c = (long long)a * b;
  if (c >= mod)
    return c % mod;
  else
    return c;
}
inline int add(int a, int b) {
  if (a < 0) a += mod;
  if (b < 0) b += mod;
  int c = a + b;
  if (c >= mod)
    return c % mod;
  else
    return c;
}
void Init() {
  fac[0] = 1;
  for (int i = 1, tp; i < N; i++) {
    fac[i] = mul(fac[i - 1], i);
    Egcd(fac[i], mod, ni[i], tp);
  }
}
int cal(int a, int b) {
  if (b < 0)
    return 0;
  else if (b == 0 || b == a)
    return 1;
  else
    return mul(mul(fac[a], ni[b]), ni[a - b]);
}
int main() {
  Init();
  int n, m, all, g, ans, i, top;
  while (scanf("%d%d%d", &n, &m, &g) != EOF) {
    all = n + m;
    ans = 0;
    if (all == 1) {
      if (g)
        ans = m;
      else
        ans = n;
    } else if (all == 2) {
      if (g) {
        if (n == 2)
          ans = 1;
        else
          ans = 0;
      } else {
        if (n == 2)
          ans = 0;
        else if (m == 2)
          ans = 1;
        else
          ans = 2;
      }
    } else if (m == 0) {
      ans = ((all + 1) % 2 == g);
    } else if (g == 0) {
      for (i = 1, top = min(all - m + 1, all - 1); i <= top; i += 2) {
        ans = add(ans, cal(all - i, m - 1));
      }
      if (m == 1) {
        ans = add(ans, (all % 2 == g));
      }
    } else {
      for (i = 2, top = min(all - m + 1, all - 1); i <= top; i += 2) {
        ans = add(ans, cal(all - i, m - 1));
      }
      if (m == 1) {
        ans = add(ans, (all % 2 == g));
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
