#include <bits/stdc++.h>
using namespace std;
const int MMAX = 201000, MOD = 1000000007;
int N, M, G;
long long answer;
long long modPow(long long x, long long y) {
  long long tmp = 1;
  while (y) {
    if (y % 2) tmp = (tmp * x) % MOD;
    x = (x * x) % MOD;
    y >>= 1;
  }
  return tmp;
}
int initSolution(int x, int y) { return (x == 1) == y; }
int main() {
  int i;
  long long tmp;
  scanf("%d %d %d", &N, &M, &G);
  if (!M)
    printf("%d\n", (N % 2) != G);
  else if (!N)
    printf("%d\n", initSolution(M, G));
  else {
    if (G == 1) {
      N -= 1;
      G = 0;
    }
    if (!N)
      printf("%d\n", initSolution(M, N % 2));
    else {
      for (i = N + M + 1, tmp = 1; i > N + 2; i -= 1) tmp = (tmp * i) % MOD;
      for (i = N + M - 1; i >= M + (N % 2 ? 0 : 1); i -= 2) {
        tmp = (tmp * modPow(i + 2, MOD - 2)) % MOD;
        tmp = (tmp * modPow(i + 1, MOD - 2)) % MOD;
        tmp = (tmp * (i + 3 - M)) % MOD;
        tmp = (tmp * (i + 2 - M)) % MOD;
        answer = (answer + tmp) % MOD;
      }
      for (i = M - 1; i > 0; i -= 1)
        answer = (answer * modPow(i, MOD - 2)) % MOD;
      printf("%d\n", ((int)answer + initSolution(M, N % 2)) % MOD);
    }
  }
  exit(0);
}
