#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007ll;
const double EPS = 1e-11;
int n, m, k;
const int FMAX = 600002;
long long fact[FMAX];
long long ifact[FMAX];
long long modpow(long long a, long long b, long long c) {
  long long r = 1;
  while (b) {
    if (b & 1) r = r * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return r;
}
long long modinv(long long a, long long c) { return modpow(a, c - 2, c); }
int main() {
  scanf("%d%d%d", &n, &m, &k);
  fact[0] = 1;
  for (int i = (int)(1); i < (int)(FMAX); ++i) fact[i] = fact[i - 1] * i % MOD;
  ifact[FMAX - 1] = modinv(fact[FMAX - 1], MOD);
  for (int i = (int)(FMAX - 1) - 1; i >= (int)(0); --i)
    ifact[i] = ifact[i + 1] * (i + 1) % MOD;
  long long ans = 0;
  int a = n - 1;
  long long bipow = 1;
  long long subsum = 0;
  long long tris = modpow(3, m + k, MOD);
  long long invtri = modinv(3, MOD);
  long long factabc = (a == 0 ? 1 : fact[a - 1]);
  int befbeg, befend;
  for (int s = (int)(0); s < (int)(m + k + 1); ++s) {
    int abc = a + s;
    factabc = factabc * abc % MOD;
    long long unit = factabc * ifact[a] % MOD * ifact[s] % MOD * tris % MOD;
    tris = tris * invtri % MOD;
    int beg = max(s - k, 0);
    int end = min(s, m);
    if (s > 0) {
      bipow += bipow;
      subsum *= 2;
      if (befbeg + 1 == beg) {
        subsum +=
            fact[s - 1] * ifact[befbeg] % MOD * ifact[s - 1 - befbeg] % MOD;
      }
      if (befend == end) {
        subsum +=
            fact[s - 1] * ifact[befend] % MOD * ifact[s - 1 - befend] % MOD;
      }
      if (bipow >= MOD) bipow -= MOD;
      subsum %= MOD;
    }
    befbeg = beg;
    befend = end;
    ans += unit * (bipow + MOD - subsum) % MOD;
    if (ans >= MOD) ans -= MOD;
  }
  printf("%lld\n", ans);
  return 0;
}
