#include<bits/stdc++.h>
#define ll long long
#define ljc 1000000007
using namespace std;
ll n,m,L,inv[1010101],fac[1010101];
ll f[1010101],sumf[1010101];
inline ll fast_pow(ll a,ll b,ll p){
	ll t=1;
	while (b){
		if (b&1ll) t=t*a%p;
		b>>=1ll;a=a*a%p;
	}
	return t;
}
inline ll C(ll n,ll m){
	if (n<0||m<0) return 0;
	if (m>n) return 0;
	return fac[n]*inv[m]%ljc*inv[n-m]%ljc;
}
signed main(){
	cin>>n>>m>>L;
	inv[0]=inv[1]=fac[1]=fac[0]=1;
	ll M=max(n,max(m,L));
	for (ll i=2;i<=3*M+2;i++) fac[i]=fac[i-1]*i%ljc;
	for (ll i=2;i<=3*M+2;i++) inv[i]=(ljc-(ljc/i)*inv[ljc%i]%ljc)%ljc;
	for (ll i=2;i<=3*M+2;i++) inv[i]=inv[i-1]*inv[i]%ljc;
	if (m>L) swap(m,L); 
	ll ans=0,inv3=fast_pow(3,ljc-2,ljc);
	for (ll t=0,sum=1,pw=fast_pow(3,m+L,ljc);t<=m+L;t++){
		ans=(ans+pw*C(n+t-1,n-1)%ljc*sum%ljc)%ljc;
		if (t<m) sum=sum*2%ljc;
		else if (m<=t&&t<L) sum=(2*sum%ljc-C(t,m)+ljc)%ljc;
		else sum=(2*sum%ljc-C(t,m)-C(t,t-L)+2*ljc)%ljc;
		pw=pw*inv3%ljc;
	}
	cout<<ans;
	return 0;
}