#include<bits/stdc++.h>

using namespace std;


typedef long long LL;

const LL MOD=1e9+7;
#define SZ 2000000
LL fact[SZ];
struct cww{cww(){
    ios::sync_with_stdio(false);cin.tie(0);
    fact[0]=1;
    for(LL i=1;i<SZ;i++)
        fact[i]=fact[i-1]*i%MOD;
}}init;
// a x + b y = gcd(a, b)
// O(log (a+b) )
LL extgcd(LL a, LL b, LL &x, LL &y) {
  LL g = a; x = 1; y = 0;
  if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x;
  return g;
}

// mを法とするaの逆元
// O(log a)
LL invMod(LL a) {
	LL x, y;
	if (extgcd(a, MOD, x, y) == 1)return (x + MOD) % MOD;
	else	 return 0; // unsolvable
}


// 組み合わせnCk (mod MOD)
// O(n)
LL Comb(LL n,LL k){
    LL u=fact[n];
    LL d=(fact[k]*fact[n-k])%MOD;
    return (u*invMod(d))%MOD;
}

//a^n (mod MOD)
//O(log a)
LL pow_mod(LL a,LL n){
    LL res=1;
    LL b=1;
    a%=MOD;
    while(n>=b){
        if(n&b)
            res=(res*a)%MOD;
        a=(a*a)%MOD;
        b<<=1;
    }
    return res;
}

int main(){
    LL N,M,K;
    cin>>N>>M>>K;

    LL res=pow_mod(3,M+K);
    LL bg=0,ed=0,sum=1;
    for(LL i=1;i<=M+K;i++){
        LL ne=min(M,i);
        LL nb=max(0ll,i-K);
        sum*=2;
        if(nb>bg)sum+=MOD-Comb(i-1,bg);
        if(ne==ed)sum+=MOD-Comb(i-1,ed);
        sum%=MOD;
        // cout<<sum<<endl;
        LL a=Comb(N-1+i,N-1)*sum%MOD;
        a=a*pow_mod(3,M+K-i)%MOD;
        res=(res+a)%MOD;
        ed=ne,bg=nb;
    }
    cout<<res<<endl;
}
