#include<iostream>
#include<cstdio>
#define mod 1000000007
using namespace std;
int read()
{
  char c=0;
  int sum=0;
  while (c<'0'||c>'9')
    c=getchar();
  while ('0'<=c&&c<='9')
    sum=sum*10+c-'0',c=getchar();
  return sum;
}
int n,m,k;
long long fac[1000001],invfac[1000001],L[1000001],U[1000001];
long long fast_pow(long long a,int b)
{
  if (b==0) return 1;
  if (b&1) return fast_pow(a*a%mod,b/2)*a%mod;
  else return fast_pow(a*a%mod,b/2);
}
long long C(int x,int y)
{
  if (x<y) return 0;
  return fac[x]*invfac[y]%mod*invfac[x-y]%mod;
}
long long cnt,ans;
int main()
{
  n=read(),m=read(),k=read();
  fac[0]=1;
  for (int i=1;i<=n+m+k;++i) fac[i]=fac[i-1]*i%mod;
  invfac[n+m+k]=fast_pow(fac[n+m+k],mod-2);
  for (int i=n+m+k-1;i>=0;--i) invfac[i]=invfac[i+1]*(i+1)%mod;
  cnt=fast_pow(3,m+k)*invfac[n-1]%mod;
  for (int d=0;d<=m+k;++d)
    {
      L[d]=max(d-k,0);
      if (d==0) U[0]=(L[d]==0);
      else
	{
	  if (L[d]==L[d-1])
	    U[d]=(U[d-1]*2%mod+C(d-1,L[d]-1)%mod-C(d-1,m)%mod)%mod;
	  else
	    U[d]=(U[d-1]*2%mod-C(d-1,L[d]-1)%mod-C(d-1,m)%mod)%mod;
	}
      ans=(ans+fast_pow(3,mod-1-d)*fac[n-1+d]%mod*U[d]%mod*invfac[d]%mod)%mod;
    }
  printf("%lld\n",(ans*cnt%mod+mod)%mod);
  return 0;
}