#include<bits/stdc++.h>
using namespace std;

const int mod = 1e9 + 7;
const int MN = 1000010;

int exp(int x, int n) {
    int ret = 1;
    while(n) {
        if(n & 1) ret = 1LL * ret * x % mod;
        x = 1LL * x * x % mod;
        n >>= 1;
    }
    return ret;
}
int inv(int x) {
    return exp(x, mod - 2);
}
int fact[MN], invf[MN];
int comb(int n, int k) {
    if(k < 0 || n < k) return 0;
    else return 1LL * fact[n] * invf[k] % mod * invf[n - k] % mod;
}

int N, M, K;

int main() {
    fact[0] = 1;
    for(int i = 1; i < MN; i++) {
        fact[i] = 1LL * fact[i - 1] * i % mod;
    }
    for(int i = 0; i < MN; i++) {
        invf[i] = inv(fact[i]);
    }

    cin >> N >> M >> K;
    N--;

    int ans = 0;
    int sum = 1;
    int l = 0;
    int r = 0;
    ans += 1LL * exp(3, M + K) % mod * sum % mod;
    ans %= mod;

    for(int i = M + K - 1; i >= 0; i--) {
        sum *= 2;
        sum %= mod;
        sum += comb(M + K - i - 1, l - 1);
        sum %= mod;
        sum += mod - comb(M + K - i - 1, r);
        sum %= mod;

        int nl = M - min(i, M);
        int nr = M - max(0, i - K);

        if(l < nl) {
            sum += mod - comb(M + K - i, l);
            sum %= mod;
        }
        if(r < nr) {
            sum += comb(M + K - i, nr);
            sum %= mod;
        }

        ans += 1LL * comb(N + M + K - i, N) * exp(3, i) % mod * sum % mod;
        ans %= mod;

        l = nl;
        r = nr;
    }

    cout << ans;
}
