#include <bits/stdc++.h>
using namespace std;
#define long long LL
const int N=1000005;
const int M=1e9+7;
int n,m,k,ans,f[N],v[N],sum;
int fp(int x,int y){int s=1;
for(;y;y>>=1){if(y&1)s=1ll*s*x%M;
x=1ll*x*x%M;}return s;}
int C(int x,int y){
return 1ll*f[x]*v[y]%M*v[x-y]%M;}
signed main(){scanf("%d%d%d",&n,&m,&k);
f[0]=v[0]=1;sum=n+m+k;
for(int i=1;i<=sum;i++)f[i]=1ll*f[i-1]*i%M;
v[sum]=fp(f[sum],M-2);for(int i=sum-1;i;i--)
v[i]=1ll*v[i+1]*(i+1)%M;if(m<k)swap(m,k);int q=1;
for(int i=n;i<=sum;i++){if(k+n>=i){
(ans+=1ll*C(i-1,n-1)*fp(3,sum-i)%M*q%M)%=M;
if(k+n!=i)q=q*2%M;}
else if(n+m>=i){q=q*2-C(i-n-1,k);q=(q%M+M)%M;
(ans+=1ll*q*C(i-1,n-1)%M*fp(3,sum-i)%M)%=M;}
else{q=q*2-C(i-n-1,k);q=(q%M+M)%M;
q=(q-C(i-n-1,i-n-m-1)+M)%M;
(ans+=1ll*q*C(i-1,n-1)%M*fp(3,sum-i)%M)%=M;}
}printf("%d\n",(ans+M)%M);return 0;}