#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
const int MOD = 1e9 + 7;
int n, m, k, ans, fac[N], inv[N], sum;
inline int fast_pow(int x, int y) {
  int ret = 1;
  for (; y; y >>= 1) {
    if (y & 1) ret = 1ll * ret * x % MOD;
    x = 1ll * x * x % MOD;
  }
  return ret;
}
inline int C(int x, int y) {
  return 1ll * fac[x] * inv[y] % MOD * inv[x - y] % MOD;
}
signed main() {
  scanf("%d%d%d", &n, &m, &k);
  fac[0] = inv[0] = 1;
  sum = n + m + k;
  for (int i = 1; i <= sum; i++) fac[i] = 1ll * fac[i - 1] * i % MOD;
  inv[sum] = fast_pow(fac[sum], MOD - 2);
  for (int i = sum - 1; i; i--) inv[i] = 1ll * inv[i + 1] * (i + 1) % MOD;
  if (m < k) swap(m, k);
  int now = 1;
  for (int i = n; i <= sum; i++) {
    if (k + n >= i) {
      (ans += 1ll * C(i - 1, n - 1) * fast_pow(3, sum - i) % MOD * now % MOD) %=
          MOD;
      if (k + n != i) now = now * 2 % MOD;
    } else if (k + m >= i) {
      now = now * 2 - C(i - n - 1, k);
      now = (now % MOD + MOD) % MOD;
      (ans += 1ll * now * C(i - 1, n - 1) % MOD * fast_pow(3, sum - i) % MOD) %=
          MOD;
    } else {
      now = now * 2 - C(i - n - 1, k);
      now = (now % MOD + MOD) % MOD;
      now = (now - C(i - n - 1, i - n - m - 1) + MOD) % MOD;
      (ans += 1ll * now * C(i - 1, n - 1) % MOD * fast_pow(3, sum - i) % MOD) %=
          MOD;
    }
  }
  printf("%d\n", (ans + MOD) % MOD);
  return 0;
}
