#include <cstdio>
#include <algorithm>
typedef long long int64;
static const int MAXN = 3e5 + 4;
static const int MODULUS = 1e9 + 7;
#define _  %  MODULUS
#define __ %= MODULUS

int n, m, k;

int64 fact[MAXN * 3], fact_inv[MAXN * 3];

inline int64 fpow(int64 base, int exp)
{
    int64 ans = 1;
    for (; exp; exp >>= 1, (base *= base)__) if (exp & 1) (ans *= base)__;
    return ans;
}
void preprocess()
{
    fact[0] = 1;
    for (int i = 1; i < MAXN * 3; ++i) fact[i] = fact[i - 1] * i _;
    fact_inv[MAXN * 3 - 1] = fpow(fact[MAXN * 3 - 1], MODULUS - 2);
    for (int i = MAXN * 3 - 2; i >= 0; --i) fact_inv[i] = fact_inv[i + 1] * (i + 1)_;
}
inline int64 binom(int n, int m)
{
    if (n < m) return 0; else return fact[n] * fact_inv[m]_ * fact_inv[n - m]_;
}

/*inline int64 _f(int s)
{
    int64 ans = 0;
    for (int t = std::max(0, s - k); t <= m; ++t) (ans += binom(s, t))__;
    //printf("%2d | %2d | %2d\n", s, std::max(0, s - k), m);
    return ans;
}*/

int64 f[MAXN * 3];

int main()
{
    preprocess();
    scanf("%d%d%d", &n, &m, &k);

    f[0] = 1;

    if (m < k) { int t = m; m = k; k = t; }
    for (int i = 1; i <= k; ++i) f[i] = (f[i - 1] + f[i - 1])_;
    for (int i = k + 1; i <= m + k; ++i)
        f[i] = (f[i - 1] + f[i - 1] - binom(i - 1, i - 1 - k) - binom(i - 1, m) + MODULUS * 2)_;

    int64 ans = 0;
    //for (int i = 0; i <= m + k; ++i) printf("%2d | %lld | %lld\n", i, f[i], _f(i));
    for (int s = n + 1; s <= n + m + k + 1; ++s) {
        (ans += binom(s - 2, n - 1) * f[s - n - 1]_ * fpow(3, n + m + k + 1 - s))__;
    }
    printf("%lld\n", ans);

    return 0;
}
