#include <bits/stdc++.h>
using namespace std;
const int lim = 200005;
long long int fact[lim], mmi[lim];
long long int expo(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int c = expo(a, b / 2);
  if (b & 1) {
    return (((c * c) % 1000000007) * a) % 1000000007;
  }
  return (c * c) % 1000000007;
}
void pre() {
  fact[0] = 1;
  mmi[0] = 1;
  for (int i = 1; i < lim; i++) {
    fact[i] = (fact[i - 1] * i) % 1000000007;
    mmi[i] = (mmi[i - 1] * expo(i, 1000000007 - 2)) % 1000000007;
  }
}
long long int f(long long int n, long long int m) {
  if (n + m == 1) {
    if (n == 1 && m == 0) return 1;
    return 0;
  }
  long long int ans = 0;
  if (m > 0) {
    ans = (ans +
           (fact[n + m - 1] * mmi[n] % 1000000007) * mmi[m - 1] % 1000000007) %
          1000000007;
  }
  if (n > 0) {
    n--;
    if (n + m == 1) {
      if (n == 0 && m == 1) ans += 1;
    } else {
      if (n > 0) {
        ans = (ans + f(n - 1, m)) % 1000000007;
      }
    }
  }
  return ans % 1000000007;
}
void solve() {
  pre();
  long long int n, m, g;
  cin >> n >> m >> g;
  if (g == 1) {
    if (n + m == 1) {
      if (n == 0 && m == 1)
        cout << 1;
      else
        cout << 0;
      return;
    } else {
      n--;
    }
  }
  cout << f(n, m);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int kickstart = 0;
  int test = 1;
  for (int i = 0; i < test; i++) {
    if (kickstart)
      cout << "Case #" << i + 1 << ": ", solve(), cout << endl;
    else
      solve();
  }
  return 0;
}
