#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int N = 200500;
int f[N + 5], r[N + 5];
int add(int x, int y) {
  x += y;
  if (x >= 1000000007LL) x -= 1000000007LL;
  return x;
}
int mul(int x, int y) {
  x = (1LL * x * y) % 1000000007LL;
  return x;
}
int p(int x, int n) {
  if (n == 0 || x == 1) {
    return 1;
  } else if (n == 1) {
    return x;
  } else if (n % 2 == 0) {
    return p(mul(x, x), n / 2);
  }
  return mul(x, p(mul(x, x), n / 2));
}
int C(int n, int k) {
  int res = ((long long)f[n]) * r[k] % 1000000007LL;
  res = ((long long)res) * r[n - k] % 1000000007LL;
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  f[0] = 1;
  for (int i = 1; i <= N; i++) {
    f[i] = (((long long)f[i - 1]) * i) % 1000000007LL;
  }
  for (int i = 0; i <= N; i++) {
    r[i] = p(f[i], 1000000007LL - 2);
  }
  while (t--) {
    int n, m, g, ans = 0;
    cin >> n >> m >> g;
    if (n + m == 1) {
      if (g == 0 && m == 0) {
        cout << 1;
        return 0;
      } else if (g == 0) {
        cout << 0;
        return 0;
      } else if (g == 1 && n == 0) {
        cout << 1;
        return 0;
      } else {
        cout << 0;
        return 0;
      }
    }
    if (m == 0) {
      if (n % 2 == 1) {
        cout << (1 - g);
      } else {
        cout << g;
      }
      return 0;
    }
    if (n == 0) {
      cout << (1 - g);
      return 0;
    }
    int total = C(n + m, min(n, m));
    m--;
    while (n + m > 0 && m >= 0 && n >= 0) {
      ans = (ans + C(n + m, min(n, m))) % 1000000007LL;
      if (n == 1 && m == 0) {
        ans = (ans + 1) % 1000000007LL;
      }
      n -= 2;
    }
    if (g == 0) {
      cout << ans;
    } else {
      cout << (((total - ans) % 1000000007LL + 1000000007LL) % 1000000007LL);
    }
  }
  return 0;
}
