#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<cmath>
#include<string>

#define ls (t<<1)
#define rs ((t<<1)+1)
#define mid ((l+r)>>1)
#define fi first
#define se second
#define mk make_pair
#define pb push_back

#define N 1000005
#define M 200005
#define seed 23333
#define Mo 1000000007

using namespace std;
int i,j,m,n,p,k,fac[N],inv[N],ans,now;
int power(int x,int y)
{
		int sum=1;
		for (;y;y>>=1)
		{
				if (y&1) sum=1ll*sum*x%Mo;
				x=1ll*x*x%Mo;
		}
		return sum;
}
int C(int x,int y)
{
		return 1ll*fac[x]*inv[y]%Mo*inv[x-y]%Mo;
}
void jia(int &x,int y)
{
		x+=y; if (x>=Mo) x-=Mo;
}
void work(int len)
{
	if (len==0) now=1;
	else 
	if (len<=k)
		now=now*2%Mo;
	else if (len<=m)
		now=(now*2%Mo-C(len-1,len-k-1)+Mo)%Mo;
	else
	{
		now=(now*2%Mo-C(len-1,len-k-1)+Mo)%Mo;
		now=(now-C(len-1,m)+Mo)%Mo;
	}
}
int main()
{
		scanf("%d%d%d",&n,&m,&k); if (m<k) swap(m,k);
		fac[0]=1; for (i=1;i<N;++i) fac[i]=1ll*fac[i-1]*i%Mo;
		inv[N-1]=power(fac[N-1],Mo-2);
		for (i=N-2;i>=0;--i) inv[i]=1ll*inv[i+1]*(i+1)%Mo;
		for (i=n;i<=n+m+k;++i)
			work(i-n), 
			jia(ans,1ll*C(i-1,n-1)*power(3,n+m+k-i)%Mo*now%Mo);
		printf("%d\n",ans);
}
