#include <bits/stdc++.h>
using namespace std;
int chh;
const int N = 200005;
const long long MOD = 1000000007;
int n, m, g;
long long c[N];
long long extend_gcd(long long a, long long b, long long &x, long long &y) {
  long long t, ret;
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    ret = extend_gcd(b, a % b, x, y);
    t = x;
    x = y;
    y = t - a / b * y;
    return ret;
  }
}
long long cal(long long n, long long m) {
  long long x, y, z;
  if (m == 0 || n == m) return 1;
  z = c[m] * c[n - m] % MOD;
  extend_gcd(z, MOD, x, y);
  if (x < 0) x += (-x) / MOD * MOD;
  while (x < 0) x += MOD;
  return c[n] * x % MOD;
}
long long get(int n, int m) {
  long long ans = 0;
  if (n == 0 && (m <= 1)) return 1;
  if (n == 0 && m == 1) return 1;
  if (n > 0 && m > 0 && n + m > 2) {
    ans = (ans + cal(n + m - 2, n - 1)) % MOD;
  }
  if (n >= 2) ans = (ans + get(n - 2, m)) % MOD;
  return ans;
}
int main() {
  long long ans, tmp;
  c[1] = 1;
  for (int i = (2); i <= (200000); i++) c[i] = c[i - 1] * i % MOD;
  while (~scanf("%d %d %d", &n, &m, &g)) {
    ans = get(n, m);
    if (g == 1)
      cout << ans << '\n';
    else {
      tmp = cal(n + m, n);
      cout << (tmp + MOD - ans) % MOD << '\n';
    }
  }
  return 0;
}
