#include<stdio.h>
#define p 1000000007
#define c(a,b) (1ll*fac[a]*inv[a-b]%p*inv[b]%p)
typedef int nlist[1000010];
nlist fac,p2,p3,inv;
int main(void){
	int n,m,k;
	scanf("%d%d%d",&n,&m,&k);
	p3[0]=p2[0]=1;
	int sum=n+m+k;
	for (int i=1;i<=sum;i++) p3[i]=3ll*p3[i-1]%p,p2[i]=2ll*p2[i-1]%p;
	inv[1]=1;
	for (int i=2;i<=sum;i++){
		inv[i]=1ll*(p-p/i)*inv[p%i]%p;
	}
	inv[0]=1;
	for (int i=1;i<=sum;i++){
		inv[i]=1ll*inv[i-1]*inv[i]%p;
	}
	fac[0]=1;
	for (int i=1;i<=sum;i++){
		fac[i]=1ll*i*fac[i-1]%p;
	}
	int  ans=0;
	if (m>k) {int t=m;m=k;k=t;} 
	for (int i=0;i<=m;i++){
		ans=(ans+1ll*fac[n-1+i]*inv[n-1]%p*inv[i]%p*p3[m+k-i]%p*p2[i]%p)%p;
	}
	int s1=1,x1=1;
	for (int i=m+1;i<=k;i++){
		int temp=(p2[i]-s1+p)%p;
		ans=(ans+1ll*fac[n-1+i]*inv[n-1]%p*inv[i]%p*p3[m+k-i]%p*temp%p)%p;
		s1=(2ll*s1%p+c(i,x1))%p;
		x1++;
	}
	int s2=1,x2=1;
	for (int i=k+1;i<=m+k;i++){
		int temp=(1ll*p2[i]-s1+p-s2+p)%p;
		ans=(ans+1ll*fac[n-1+i]*inv[n-1]%p*inv[i]%p*p3[m+k-i]%p*temp%p)%p;
		s1=(2ll*s1%p+c(i,x1))%p;
		s2=(2ll*s2%p+c(i,x2))%p;
		x1++,x2++;
	}
	printf("%d",ans);
}