#include<bits/stdc++.h>
#define LL long long
#define N 555555
#define M 1000000007
int A,B,C,S,i;LL w,an,pw[N],I[N];
LL Pw(LL a,LL b,LL p){
	LL v=1;
	for(;b;b>>=1,a=a*a%p)if(b&1)v=v*a%p;
	return v;
}
LL Ce(int x,int y){
	return pw[y]*I[x]%M*I[y-x]%M;
}
int main(){
	scanf("%d%d%d",&A,&B,&C);
	S=A+B+C;
	for(pw[0]=i=1;i<=S;i++)pw[i]=1ll*i*pw[i-1];
	I[S]=Pw(pw[S],M-2,M);
	for(i=S;i;i--)I[i-1]=1ll*i*I[i]%M;w=1;
	for(i=A;i<=S;i++){
		an=(an+Ce(A-1,i-1)*w%M*Pw(3,S-i,M))%M;
		w=(w+w)%M;
		if(i>=A+B)w=(w-Ce(B,i-A)+M)%M;
		if(i>=A+C)w=(w-Ce(i-A-C,i-A)+M)%M;
	}
	printf("%lld",an);
}