#include <bits/stdc++.h>
#define rep(i,a,b) for (int i=(a); i<(b); i++)
#define per(i,a,b) for (int i=(b)-1; i>=(a); i--)
#define debug(x) cout << #x << " => " << x << endl
using namespace std;
const int MAX_N = 7 + 300000;
const int MOD = 1e9 + 7;
///----------------------------------------------
int qpow(int a,int b) {
    int ret=1;
    for (; b; b>>=1) {
        if (b&1) ret=1ll*ret*a%MOD;
        a=1ll*a*a%MOD;
    }
    return ret;
}
///----------------------------------------------
int jc[MAX_N*3],jcr[MAX_N*3];
int C(int n,int m) {
    return 1ll*jc[n]*jcr[m]%MOD*jcr[n-m]%MOD;
}
///----------------------------------------------
int fb[MAX_N*3],fc[MAX_N*3];
int main() {

    ///read
    int n1,n2,n3; cin>>n1>>n2>>n3;
    int n=n1+n2+n3;

    ///prework
    jc[0]=1; rep(i,1,n+1) jc[i]=1ll*jc[i-1]*i%MOD;
    rep(i,0,n+1) jcr[i]=qpow(jc[i],MOD-2);
    rep(i,n2+1,n+1) fb[i]=(fb[i-1]+(fb[i-1]+C(i-1,n2))%MOD)%MOD;
    rep(i,n3+1,n+1) fc[i]=(fc[i-1]+(fc[i-1]+C(i-1,n3))%MOD)%MOD;

    ///work
    int ans=0;
    rep(i,n1,n+1) {
        int tmp=((qpow(2,i-n1)+MOD-fb[i-n1])%MOD+MOD-fc[i-n1])%MOD;
        tmp=1ll*tmp*qpow(3,n-i)%MOD;
        ans=(ans+1ll*tmp*C(i-1,n1-1)%MOD)%MOD;
    }
    cout << ans;

}

