#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int n, m, k;
int f[4][1010101];
int pow1[1010101], pow2[1010101];
;
int g[4][4][1010101];
int fac[1010101], rev[1010101], ifac[1010101];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  pow1[0] = fac[0] = ifac[0] = rev[0] = pow2[0] = 1;
  ifac[1] = rev[1] = 1;
  for (int i = 1; i <= n + m + k; ++i) {
    pow1[i] = pow1[i - 1] * 3ll % MOD;
    pow2[i] = pow2[i - 1] * 2 % MOD;
    fac[i] = fac[i - 1] * 1ll * i % MOD;
    if (i >= 2) {
      rev[i] = MOD - 1ll * (MOD / i) * rev[MOD % i] % MOD;
      ifac[i] = 1ll * ifac[i - 1] * rev[i] % MOD;
    }
  }
  int mn = min(n, m);
  mn = min(mn, k);
  f[1][n] = 1;
  f[2][m + 1] = 1;
  f[3][k + 1] = 1;
  g[1][2][n + m] = 1ll * fac[n + m] * ifac[n] % MOD * ifac[m] % MOD;
  g[1][3][n + k] = 1ll * fac[n + k] * ifac[n] % MOD * ifac[k] % MOD;
  g[2][3][m + k + 1] = 1ll * fac[m + k + 1] * ifac[m + 1] % MOD * ifac[k] % MOD;
  g[2][1][m + n] = 1ll * fac[m + n] * ifac[m + 1] % MOD * ifac[n - 1] % MOD;
  g[3][1][k + n] = 1ll * fac[k + n] * ifac[k + 1] % MOD * ifac[n - 1] % MOD;
  g[3][2][k + m + 1] = 1ll * fac[k + m + 1] * ifac[k + 1] % MOD * ifac[m] % MOD;
  int ans = pow1[m + k];
  long long cnt1 = 0;
  long long cnt2 = 0;
  long long cnt3 = 0;
  for (int i = mn + 1; i <= n + m + k; ++i) {
    if (i > n) {
      f[1][i] = 1ll * fac[i - 1] * ifac[n - 1] % MOD * ifac[i - n] % MOD *
                pow2[i - n] % MOD;
      f[1][i] -= 1ll * fac[i - 1] * ifac[m] % MOD * ifac[i - m - n] % MOD *
                 ifac[n - 1] % MOD;
      f[1][i] -= 1ll * fac[i - 1] * ifac[k] % MOD * ifac[i - k - n] % MOD *
                 ifac[n - 1] % MOD;
      while (f[1][i] < 0) f[1][i] += MOD;
      ans += 1ll * f[1][i] * pow1[n + m + k - i] % MOD;
      if (ans >= MOD) ans -= MOD;
    }
    if (i > m + 1) {
      f[2][i] = 1ll * fac[i - 1] * ifac[m] % MOD * ifac[i - m - 1] % MOD *
                pow2[i - m - 1] % MOD;
      f[2][i] -= 1ll * fac[i - 1] * ifac[n - 1] % MOD * ifac[i - n - m] % MOD *
                 ifac[m] % MOD;
      f[2][i] -= 1ll * fac[i - 1] * ifac[k] % MOD * ifac[i - 1 - m - k] % MOD *
                 ifac[m] % MOD;
      while (f[2][i] < 0) f[2][i] += MOD;
    }
    if (i > k + 1) {
      f[3][i] = 1ll * fac[i - 1] * ifac[i - k - 1] % MOD * ifac[k] % MOD *
                pow2[i - k - 1] % MOD;
      f[3][i] -= 1ll * fac[i - 1] * ifac[n - 1] % MOD * ifac[i - n - k] % MOD *
                 ifac[k] % MOD;
      f[3][i] -= 1ll * fac[i - 1] * ifac[m] % MOD * ifac[i - 1 - m - k] % MOD *
                 ifac[k] % MOD;
      while (f[3][i] < 0) f[3][i] += MOD;
    }
  }
  printf("%d\n", ans);
  return 0;
}
