#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  register char c = getchar();
  bool f = 0;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') c = getchar(), f = 1;
  while (c >= '0' && c <= '9') x = x * 10 + c - 48, c = getchar();
  x = f ? -x : x;
  return;
}
template <class T>
inline void write(T x) {
  if (!x) {
    putchar(48);
    return;
  }
  if (x < 0) x = -x, putchar('-');
  int len = -1, z[20];
  while (x > 0) z[++len] = x % 10, x /= 10;
  for (register int i = len; i >= 0; i--) putchar(z[i] + 48);
  return;
}
const int N = 600010, Mod = 1e9 + 7;
int fac[N], ifac[N];
int fpow(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = 1ll * a * a % Mod)
    if (b & 1) res = 1ll * res * a % Mod;
  return res;
}
int C(int n, int m) {
  if (n < m) return 0;
  if (n < 0 || m < 0) return 0;
  return 1ll * fac[n] * ifac[n - m] % Mod * ifac[m] % Mod;
}
int n, m, k;
int main() {
  read(n), read(m), read(k);
  fac[0] = 1;
  for (int i = 1; i <= N - 10; i++) fac[i] = 1ll * fac[i - 1] * i % Mod;
  ifac[N - 10] = fpow(fac[N - 10], Mod - 2);
  for (int i = N - 10; i >= 1; i--) ifac[i - 1] = 1ll * ifac[i] * i % Mod;
  long long ans = fpow(3, m + k), S = 1;
  for (int t = 1; t <= m + k; t++) {
    S = (2 * S % Mod - C(t - 1, m) + Mod) % Mod;
    if (t - k > 0) S = (S - C(t - 1, t - k - 1) + Mod) % Mod;
    ans =
        (ans + 1ll * fpow(3, m + k - t) * C(t + n - 1, n - 1) % Mod * S % Mod) %
        Mod;
  }
  printf("%lld\n", ans);
  return 0;
}
