#include <bits/stdc++.h>
using namespace std;
long long M = 1000000007;
vector<long long> fac(1000001);
vector<long long> ifac(1000001);
long long mpow(long long x, long long n) {
  long long ans = 1;
  while (n != 0) {
    if (n & 1) ans = ans * x % M;
    x = x * x % M;
    n = n >> 1;
  }
  return ans;
}
void setcomb() {
  fac[0] = 1;
  ifac[0] = 1;
  for (long long i = 0; i < 1000000; i++) {
    fac[i + 1] = fac[i] * (i + 1) % M;
  }
  ifac[1000000] = mpow(fac[1000000], M - 2);
  for (long long i = 1000000; i > 0; i--) {
    ifac[i - 1] = ifac[i] * i % M;
  }
}
long long comb(long long a, long long b) {
  if (a == 0 && b == 0) return 1;
  if (a < b || a < 0) return 0;
  long long tmp = ifac[a - b] * ifac[b] % M;
  return tmp * fac[a] % M;
}
long long perm(long long a, long long b) {
  if (a == 0 && b == 0) return 1;
  if (a < b || a < 0) return 0;
  return fac[a] * ifac[a - b] % M;
}
long long modinv(long long a) {
  long long b = M, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= M;
  if (u < 0) u += M;
  return u;
}
struct Mo {
  vector<int> left, right, order;
  vector<bool> v;
  int width;
  int nl, nr, ptr;
  Mo(int n) : width((int)sqrt(n)), nl(0), nr(0), ptr(0), v(n) {}
  void insert(int l, int r) {
    left.push_back(l);
    right.push_back(r);
  }
  void build() {
    for (int i = 0; i < left.size(); i++) order.push_back(i);
    sort(begin(order), end(order), [&](int a, int b) {
      if (left[a] / width != left[b] / width) return left[a] < left[b];
      return right[a] < right[b];
    });
  }
  int process() {
    if (ptr == order.size()) return (-1);
    const auto id = order[ptr];
    while (nl > left[id]) ldistribute(--nl, nr);
    while (nr < right[id]) rdistribute(nr++, nl);
    while (nl < left[id]) ldistribute(nl++, nr);
    while (nr > right[id]) rdistribute(--nr, nl);
    return (order[ptr++]);
  }
  inline void ldistribute(int l, int r) {
    v[l].flip();
    if (v[l])
      ladd(r, l);
    else
      ldel(r, l);
  }
  inline void rdistribute(int r, int l) {
    v[r].flip();
    if (v[r])
      radd(r, l);
    else
      rdel(r, l);
  }
  void ladd(int n, int k);
  void radd(int n, int b);
  void ldel(int n, int k);
  void rdel(int n, int b);
};
long long sum = 1;
void Mo::ladd(int n, int k) {
  sum += M - comb(n, k + 1);
  sum %= M;
}
void Mo::ldel(int n, int k) {
  sum += comb(n, k + 1);
  sum %= M;
}
void Mo::radd(int n, int b) {
  sum *= 2;
  sum += M - comb(n, b);
  sum %= M;
}
void Mo::rdel(int n, int b) {
  sum += comb(n, b);
  sum *= ifac[2];
  sum %= M;
}
int main() {
  setcomb();
  long long n, m, k, val[1222222], ans = 0, i, zero = 0;
  cin >> n >> m >> k;
  Mo mo(m + k + 1);
  for (i = 0; i < (m + k + 1) * 2; i++) val[i] = 1;
  for (i = 0; i <= m + k; i++) {
    long long bot = m - min(m, i), top = m - max(zero, i - k);
    mo.insert(top, m + k - i);
    if (bot == 0) {
      val[i * 2 + 1] = 0;
      mo.insert(0, 0);
    } else {
      mo.insert(bot - 1, m + k - i);
    }
  }
  mo.build();
  for (i = 0; i < (m + k + 1) * 2; i++) {
    long long idx = mo.process();
    if (val[idx]) val[idx] = sum;
  }
  for (i = 0; i <= m + k; i++) {
    long long p = mpow(3, i);
    p *= comb(n - 1 + m + k - i, n - 1);
    p %= M;
    p *= M + val[i * 2] - val[i * 2 + 1];
    p %= M;
    ans += p;
  }
  ans %= M;
  cout << ans << endl;
}
