/*
  mail: mleautomaton@foxmail.com
  author: MLEAutoMaton
  This Code is made by MLEAutoMaton
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define ll long long
#define REP(a,b,c) for(int a=b;a<=c;a++)
#define re register
#define int ll
#define file(a) freopen(a".in","r",stdin);freopen(a".out","w",stdout)
inline int gi(){
	int f=1,sum=0;char ch=getchar();
	while(ch>'9' || ch<'0'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0' && ch<='9'){sum=(sum<<3)+(sum<<1)+ch-'0';ch=getchar();}
	return f*sum;
}
int n,m,k;
const int N=1000010,Mod=1e9+7;
int fac[N],fai[N],inv[N];
void init(){
	fac[0]=fai[0]=inv[0]=inv[1]=1;
	for(int i=1;i<=1000000;i++)fac[i]=1ll*fac[i-1]*i%Mod;
	for(int i=2;i<=1000000;i++)inv[i]=1ll*(Mod-Mod/i)*inv[Mod%i]%Mod;
	for(int i=1;i<=1000000;i++)fai[i]=1ll*fai[i-1]*inv[i]%Mod;
}
int C(int n,int m){
	if(n<m || n<0 || m<0)return 0;
	return 1ll*fac[n]*fai[m]%Mod*fai[n-m]%Mod;
}
int qpow(int a,int b){
	int ret=1;
	while(b){
		if(b&1)ret=1ll*ret*a%Mod;
		b>>=1;a=1ll*a*a%Mod;
	}
	return ret;
}
signed main(){
	n=gi();m=gi();k=gi();
	init();
	int ans=qpow(3,m+k),sum=1;
	for(int u=1;u<=m+k;u++){
		sum=(2ll*sum%Mod-(u>k?C(u-1,k):0)+Mod-(u>m?C(u-1,u-m-1):0)+Mod)%Mod;
		ans=(ans+1ll*C(n+u-1,n-1)*qpow(3,m+k-u)%Mod*sum%Mod)%Mod;
	}
	printf("%lld\n",(ans+Mod)%Mod);
	return 0;
}
