#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define mod 1000000007
#define N 1000010
ll fac[N],inv[N],ivf[N];
void initmo(){
    fac[0]=ivf[0]=inv[1]=1;
    for(ll i=1;i<N;i++){
	if(i>1)inv[i]=(mod-mod/i*inv[mod%i]%mod)%mod;
	fac[i]=fac[i-1]*i%mod;
	ivf[i]=ivf[i-1]*inv[i]%mod;
    }
}
ll C(ll n,ll k){
    return fac[n]*ivf[n-k]%mod*ivf[k]%mod;
}
ll po(ll x,ll y){
    ll res=1;
    for(;y;y>>=1){
	if(y&1)res=res*x%mod;
	x=x*x%mod;
    }
    return res;
}
int main(){
    initmo();
  ll a,b,c;cin>>a>>b>>c; if(a>N||b>N||c>N)return 0;
  a--; if(b>c)swap(b,c);
  ll ans=0,sum=1;
  for(ll k=a;k<=a+b+c;k++){
      ll cur=po(3,a+b+c-k)*C(k,a)%mod;
      cur=cur*sum%mod;
      ans=(ans+cur)%mod;
      ll s=k-a;
      sum=sum*2%mod;
      if(b<=s)sum-=C(s,b);
      if(c<=s)sum-=C(s,s-c);
  }
  if(ans<0)ans+=mod;
  cout<<ans<<endl;
    return 0;
}

