#include <bits/stdc++.h>
using namespace std;
long long GSD(int a, int b) {
  if (b == 0) return a;
  if (a == 0) return b;
  if (a >= b)
    return GSD(b, a % b);
  else
    return GSD(a, b % a);
}
pair<int, int> diof(int a, int b) {
  if (b == 0) return make_pair(1, 0);
  if (a == 0) return make_pair(0, -1);
  pair<long long, long long> ans;
  if (a >= b) {
    ans = diof(a % b, b);
    ans.second += a / b * ans.first;
    return ans;
  }
  ans = diof(a, b % a);
  ans.first += b / a * ans.second;
  return ans;
}
int n, m, g;
int main() {
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &g);
  if (m == 0) {
    if (n % 2 != g)
      printf("%d\n", 1);
    else
      printf("%d\n", 0);
    return 0;
  }
  if (n == 0) {
    if (m != 1)
      g ? printf("%d\n", 0) : printf("%d\n", 1);
    else
      g ? printf("%d\n", 1) : printf("%d\n", 0);
    return 0;
  }
  long long ans = 0;
  if (g == 0)
    ans = n % 2 ? m : 1;
  else
    ans = n % 2 ? 1 : m;
  long long cur = ans, b = m - 1 + (n + g) % 2;
  for (int i = 0; i < ((n - g) / 2); ++i) {
    cur = cur * (b + 2) % 1000000007;
    cur = cur * (b + 1) % 1000000007;
    cur = cur * diof(b - m + 2, 1000000007).first % 1000000007;
    cur = cur * diof(b - m + 3, 1000000007).first % 1000000007;
    ans += cur;
    ans %= 1000000007;
    b += 2;
  }
  if (m == 1) {
    if ((n + m) % 2 != g)
      ans -= 1;
    else
      ans += 1;
  }
  if (ans < 0) ans += 1000000007;
  cout << ans << endl;
}
