#include<bits/stdc++.h>
#define MN 1000000
#define mod 1000000007
using namespace std;
inline int read()
{
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
int n,m,K,p[MN+5],inv[MN+5],pw[MN+5],ans;
inline int C(int n,int m){return m<0||m>n?0:1LL*p[n]*inv[m]%mod*inv[n-m]%mod;}
int main()
{
    n=read();m=read();K=read();p[0]=inv[0]=p[1]=inv[1]=pw[0]=1;pw[1]=3;
    for(int i=2;i<=MN;++i) p[i]=1LL*p[i-1]*i%mod,inv[i]=1LL*(mod-mod/i)*inv[mod%i]%mod,pw[i]=3LL*pw[i-1]%mod;
    for(int i=2;i<=MN;++i) inv[i]=1LL*inv[i-1]*inv[i]%mod;
    for(int i=0,res=1;i<=m+K;++i)
    {
        if(i)
        {
            int l=max(0,i-K),r=min(m,i);
            int L=max(0,i-1-K),R=min(m,i-1);
            res=(2LL*res+mod-C(i-1,R)+C(i-1,L-1))%mod;
            if(l>L) res=(res+mod-C(i,L))%mod;
            if(r>R) res=(res+C(i,r))%mod;
        }
        ans=(ans+1LL*res*C(i+n-1,n-1)%mod*pw[m+K-i])%mod;
    }
    cout<<ans;
	return 0;
}
