#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000 * 1000 * 1000 + 7;
const int N = 300500;
int pw3[3 * N];
int stup(int n, int m, int k) {
  const int N = 21;
  int D[3][N][N][N];
  memset(D, 0, sizeof(D));
  for (int s = 0; s < 3 * N; s++) {
    for (int x = 0; x <= min(s, N - 1); x++) {
      for (int y = 0; x + y <= s && y <= N - 1; y++) {
        int z = s - x - y;
        if (z < 0 || z > N - 1) continue;
        for (int w = 0; w < 3; w++) {
          int g[] = {x, y, z};
          if (g[w] == 0) {
            if (w == 0)
              D[w][x][y][z] = pw3[y + z];
            else
              D[w][x][y][z] = 0;
          } else {
            g[w]--;
            D[w][x][y][z] = (1ll * D[0][g[0]][g[1]][g[2]] +
                             D[1][g[0]][g[1]][g[2]] + D[2][g[0]][g[1]][g[2]]) %
                            MOD;
          }
        }
      }
    }
  }
  return D[0][n][m][k];
}
int powmod(int x, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) res = 1ll * res * x % MOD;
    x = 1ll * x * x % MOD;
    b >>= 1;
  }
  return res;
}
inline int inv(int x) { return powmod(x, MOD - 2); }
int F[2 * N], iF[2 * N];
int C(int x, int y) {
  if (y < 0 || y > x || x < 0) return 0;
  return 1ll * F[x] * iF[y] % MOD * iF[x - y] % MOD;
}
int D[3 * N];
int n, m, k;
int get(int x) {
  if (x == 0) D[x] = 1;
  if (D[x] != -1) return D[x];
  D[x] = 2ll * D[x - 1] % MOD;
  if (x >= m + 1 && x < k + 1) {
    D[x] = (D[x] + MOD - C(x - 1, x - m - 1)) % MOD;
  } else if (x >= k + 1) {
    D[x] = (D[x] + 2ll * MOD - C(x - 1, x - m - 1) - C(x - 1, x - k - 1)) % MOD;
  }
  return D[x];
}
int main() {
  memset(D, -1, sizeof(D));
  pw3[0] = 1;
  for (int i = 1; i < 3 * N; i++) {
    pw3[i] = (pw3[i - 1] * 3ll) % MOD;
  }
  F[0] = 1;
  for (int i = 1; i < 2 * N; i++) {
    F[i] = 1ll * F[i - 1] * i % MOD;
  }
  iF[2 * N - 1] = inv(F[2 * N - 1]);
  for (int i = 2 * N - 2; i >= 0; i--) iF[i] = 1ll * iF[i + 1] * (i + 1) % MOD;
  scanf("%d %d %d", &n, &m, &k);
  if (m > k) swap(m, k);
  int ans = 0;
  for (int l = n; l <= n + m + k; l++) {
    int cur1 = C(l - 1, n - 1);
    int cur2 = get(l - n);
    int cur3 = pw3[n + m + k - l];
    ans += 1ll * cur1 * cur2 % MOD * cur3 % MOD;
    if (ans >= MOD) ans -= MOD;
  }
  printf("%d\n", ans);
  if (n <= 20 && m <= 20 && k <= 20) {
    int s = stup(n, m, k);
    fprintf(stderr, "stup = %d\n", s);
    assert(s == ans);
  }
}
