#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int MD = 1e9 + 7;
struct Mint {
  int v;
  Mint(int _v = 0) : v(_v) {}
  Mint &operator+=(const Mint &r) {
    if ((v += r.v) >= MD) v -= MD;
    return *this;
  }
  Mint &operator-=(const Mint &r) {
    if ((v -= r.v) < 0) v += MD;
    return *this;
  }
  Mint &operator*=(const Mint &r) {
    v = ll(v) * r.v % MD;
    return *this;
  }
  Mint operator+(const Mint &r) const { return Mint(*this) += r; }
  Mint operator-(const Mint &r) const { return Mint(*this) -= r; }
  Mint operator*(const Mint &r) const { return Mint(*this) *= r; }
  Mint pow(int n) const {
    Mint x = *this, r = 1;
    while (n) {
      if (n & 1) r *= x;
      x *= x;
      n >>= 1;
    }
    return r;
  }
  Mint inv() const { return this->pow(MD - 2); }
};
const int B = 999999;
int N, Mint, K;
Mint fac[B], ifac[B];
Mint C(int n, int m) {
  if (n < 0 || m < 0 || n < m) return Mint(0);
  return fac[n] * ifac[m] * ifac[n - m];
}
void first() {
  fac[0] = 1;
  for (int i = 1; i < B; i++) fac[i] = fac[i - 1] * Mint(i);
  ifac[B - 1] = fac[B - 1].inv();
  for (int i = B - 2; i >= 0; i--) ifac[i] = ifac[i + 1] * Mint(i + 1);
}
int main() {
  first();
  cin >> N >> Mint >> K;
  if (Mint > K) swap(Mint, K);
  Mint ans = 0;
  for (int i = 0; i <= Mint; i++) {
    ans += C(N - 1 + i, N - 1) * Mint(2).pow(i) * Mint(3).pow(Mint + K - i);
  }
  Mint sm = Mint(2).pow(Mint);
  for (int i = Mint + 1; i <= Mint + K; i++) {
    sm = Mint(2) * sm - C(i - 1, Mint) + C(i - 1, i - 2 - Mint) -
         C(i, i - 1 - Mint);
    ans += C(N - 1 + i, N - 1) * sm * Mint(3).pow(Mint + K - i);
  }
  cout << ans.v << endl;
  return 0;
}
