#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const long long mod = 1e9 + 7;
template <typename T>
inline T gcd(T a, T b) {
  return !b ? a : gcd(b, a % b);
}
template <typename T>
inline T q_pow(T a, T x) {
  T ans = 1, tmp = a;
  while (x) {
    if (x & 1) (ans *= tmp) %= mod;
    (tmp *= tmp) %= mod;
    x >>= 1;
  }
  return ans;
}
template <typename T>
inline void re(T &N) {
  int f = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f = -1;
  N = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') N = N * 10 + c - '0';
  N *= f;
}
int m, n, k, t = 1, st, en;
long long p[N];
long long mul[N], inv[N];
inline long long C(int m, int n) {
  if (m < 0 || m > n) return 0;
  return mul[n] * inv[m] % mod * inv[n - m] % mod;
}
int main() {
  p[0] = 1;
  for (int i = 1; i < N; i++) p[i] = p[i - 1] * 3 % mod;
  inv[0] = mul[0] = 1;
  for (int i = 1; i < N; i++)
    mul[i] = mul[i - 1] * i % mod, inv[i] = q_pow(mul[i], mod - 2);
  re(n);
  re(m);
  re(k);
  long long ans = 0, s1 = 0, s2 = 0;
  for (int i = 0; i <= m + k; i++) {
    if (!i)
      s1 = 1;
    else if (i <= m)
      (s1 *= 2) %= mod;
    else
      s1 = (((s1 - C(m, i - 1)) * 2 + C(m, i)) % mod + mod) % mod;
    if (i - k > 0) (s2 = s2 * 2 + C(i - k, i)) %= mod;
    (ans += C(n - 1, n + i - 1) * p[m + k - i] % mod * (s1 - s2 + mod) % mod) %=
        mod;
  }
  printf("%lld\n", ans);
}
