#include <bits/stdc++.h>
using namespace std;
int N, M, G, a[200005], f[200005];
long long Pow(long long a, int b) {
  long long c = 1;
  for (; b; b >>= 1, a = a * a % 1000000007)
    if (b & 1) c = c * a % 1000000007;
  return c;
}
int C(int n, int m) {
  return n < m ? 0
               : Pow(a[m], 1000000007 - 2) * Pow(a[n - m], 1000000007 - 2) %
                     1000000007 * a[n] % 1000000007;
}
int main() {
  scanf("%d%d%d", &N, &M, &G), a[0] = 1, f[0] = M > 1, f[1] = M < 2 ? M + 1 : M;
  for (int i = 1; i <= N + M; i++) a[i] = (long long)a[i - 1] * i % 1000000007;
  for (int i = 2; i <= N; i++) f[i] = (f[i - 2] + C(i + M - 1, i)) % 1000000007;
  printf("%d\n", !G ? f[N] : (C(N + M, N) - f[N] + 1000000007) % 1000000007);
  return 0;
}
