#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
typedef long long ll;
ll mod=1e9+7;
void add(ll &x,ll y){
	x+=y;
	x%=mod;
}
const int M=1000000;
ll f[M+1],g[M+1],inv[M+1];
void precalc(){
	f[0]=1;
	rep1(i,M) f[i]=f[i-1]*i%mod;
	inv[1]=1;
	for(int i=2;i<=M;i++) inv[i]=mod-mod/i*inv[mod%i]%mod;
	g[0]=1;
	rep1(i,M) g[i]=g[i-1]*inv[i]%mod;
}
ll Comb(int x,int y){
	return f[x]*g[y]%mod*g[x-y]%mod;
}


int A,B,C;
ll p3[M+1];
int main(){
	precalc();
	p3[0]=1;
	rep1(i,M) p3[i]=p3[i-1]*3%mod;
	cin>>A>>B>>C;
	ll ans=0;
	int pL,pR;
	ll sum=0;
	for(int last=A;last<=A+B+C;last++){
		int N=last-A;
		int L=max(0,N-C),R=min(B,N);
		if(L<=R){
			if(last==A){
				sum=1;
			}else{
				sum=sum*2+Comb(N-1,pL-1)+Comb(N-1,pR+1);
				if(pL+1==L) sum-=Comb(N,pL);
				if(pR==R) sum-=Comb(N,R+1);
				sum%=mod;
			}
			ll c=Comb(last-1,A-1)*sum%mod*p3[A+B+C-last]%mod;
			add(ans,c);
		}
		pL=L,pR=R;
	}
	if(ans<0) ans+=mod;
	cout<<ans<<endl;
}
