#include<bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;
const int MAXN = 1000005;

int mul (int x, int y) {return 1LL * x * y % MOD;}
int add (int x, int y) {x += y; if (x >= MOD) return x - MOD; return x;}
int sub (int x, int y) {x -= y; if (x < 0) return x + MOD; return x;}

int a, b, c, sol;
int fct[MAXN], inv[MAXN];

int pot (int a, int e) {
    int res = 1;
    while (e > 0) {
        if (e & 1) res = mul(res, a);
        a = mul(a, a);
        e /= 2;
    }
    return res;
}

void precompute () {
    fct[0] = inv[0] = 1;
    for (int i = 1; i < MAXN; i++) {
        fct[i] = mul(fct[i - 1], i);
        inv[i] = pot(fct[i], MOD - 2);
    }
}

int nck (int n, int k) {
    return mul(fct[n], mul(inv[n - k], inv[k]));
}

void calc () {
    if (b > c) swap(b, c);
    int curr = 0, uk = 1;
    for (int len = 0; len <= b + c; len++) {
        int val = sub(uk, curr);
        val = mul(val, nck(len + a - 1, a - 1));
        val = mul(val, pot(3, b + c - len));
        sol = add(sol, val);
        uk = sub(add(uk, uk), nck(len, min(len, b)));
        if (len < b) uk = add(uk, 1);
        if (len == c) {
            curr = 1;
        } else if (len > c) {
            curr = add(sub(add(curr, curr), nck(len, len - c - 1)), nck(len + 1, len - c));
        }
    }
}

int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    precompute();
    cin >> a >> b >> c;
    calc();
    cout << sol;
    return 0;
}
