#include <bits/stdc++.h>
using namespace std;
const int Mod = 1000000007;
long long Inv(long long a) {
  long long ans = 1, b = Mod - 2;
  while (b > 0) {
    if (b & 1) ans = (ans * a) % Mod;
    b >>= 1;
    a = a * a % Mod;
  }
  return ans;
}
void Solve() {
  int n, m, g;
  long long ans = 0, C = 1;
  scanf("%d%d%d", &n, &m, &g);
  if (n == 0) {
    if (g)
      printf("%d\n", (m == 1));
    else
      printf("%d\n", (m > 1));
    return;
  }
  if (g) n--;
  if (m == 0) {
    printf("%d\n", n & 1);
    return;
  }
  for (int i = 0; i <= n; i++) {
    if ((n - i) % 2 == 0) ans = (ans + C) % Mod;
    C = C * (m + i) % Mod * Inv(i + 1) % Mod;
  }
  if (m == 1) {
    if (n & 1)
      ans = (ans + 1) % Mod;
    else
      ans = (ans + Mod - 1) % Mod;
  }
  printf("%I64d\n", ans);
}
int main() {
  Solve();
  return 0;
}
