#include<bits/stdc++.h>
#define ll long long
#define Everyone Input();
#define Has solve();
#define A print();
#define Dream return 0;
using namespace std;
const int maxn=9e5+20,mod=1e9+7;
ll N,M,K,Pow[maxn],fac[maxn],inv[maxn],ans=0;
inline long long read()
{
    long long s=0,f=1; char ch;for(;ch<'0'||ch>'9';ch=getchar()) if(ch=='-') f=-1;
    for(;ch>='0'&&ch<='9';ch=getchar()) s=(s<<3)+(s<<1)+ch-'0';return s*f;
}
void Prepare(int Max)
{
    fac[0]=inv[0]=Pow[0]=inv[1]=1LL;
    for(int i=2;i<=Max;++i) inv[i]=(mod-mod/i)*inv[mod%i]%mod;
    for(int i=1;i<=Max;++i)
    {
        fac[i]=(ll)fac[i-1]*i%mod;
        inv[i]=(inv[i]*inv[i-1])%mod;
        Pow[i]=(ll)Pow[i-1]*3%mod;
    }
}
ll C(int n,int m){return (fac[n]*inv[m])%mod*inv[n-m]%mod;}
void Input()
{
    N=read(),M=read(),K=read();
    Prepare(N+M+K);
}
void solve()
{
    if(M<K) swap(M,K); ll res=1LL;
    for(int i=0;i<=M+K;++i)
    {
        ans=(ans+(C(N-1+i,N-1)*Pow[M+K-i]%mod)*res%mod)%mod;
        if(i<K) res<<=1,res%=mod;
        else if(i>=M) res=(res+res-C(i,K)-C(i,i-M))%mod;
        else res=(res-C(i,K)+res)%mod;
    }
}
void print(){printf("%lld\n",(ans+mod)%mod);}
int main(){ Everyone Has A Dream }
