#include <bits/stdc++.h>
using namespace std;
const int p = 1e9 + 7;
const int maxn = 2 * 100000 + 150;
long long n, m, dp[maxn], dpd[maxn];
long long tavan(long long a, long long k) {
  if (!k) return 1;
  if (k == 1) return a;
  long long o = tavan((a * a) % p, k / 2);
  return (o * (k % 2 ? a : 1)) % p;
}
long long C(int n, int r) {
  if (r < 0 || n < r) return 0;
  long long o = (((dp[n] * dpd[r]) % p) * dpd[n - r]) % p;
  return o;
}
int main() {
  bool g;
  long long ans = 0;
  cin >> n >> m >> g;
  if (!m) {
    cout << (n % 2 != g) << endl;
    return 0;
  }
  dp[0] = 1;
  for (int i = 1; i <= n + m; i++) dp[i] = (dp[i - 1] * i) % p;
  for (int i = 0; i <= n + m; i++) {
    dpd[i] = tavan(dp[i], p - 2);
  }
  for (int i = g; i <= n; i += 2)
    if (n + m - i - 1) ans = (ans + C(n + m - i - 1, m - 1)) % p;
  if (m == 1) ans += (g != n % 2);
  cout << ans << endl;
  return 0;
}
