#include<cstdio>
#include<utility>
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef double db;
#define ls(x) x<<1
#define rs(x) x<<1|1
#define low(x) (x&-x)
#define all(x) x.begin(),x.end()
#define mp make_pair
#define X first
#define Y second
#ifdef _DEBUG
    const int N=1e6+10;
#else
    const int N=1e6+10;
#endif
const ll mod=1e9+7;
template<typename T> inline T gcd(T a,T b){return !b?a:gcd(b,a%b);}
template<typename T> inline T q_pow(T a,T x){T ans=1,tmp=a;while(x){if(x&1)(ans*=tmp)%=mod;(tmp*=tmp)%=mod;x>>=1;}return ans;}
template<typename T> inline void re(T &N){int f=1;char c;while((c=getchar())< '0'||c> '9')if(c=='-')f=-1;N=c-'0';while((c=getchar())>='0'&&c<='9')N=N*10+c-'0';N*=f;}
int m,n,k,t=1,st,en;
ll p[N];
ll mul[N],inv[N];
inline ll C(int m,int n)
{
    if(m< 0||m> n)return 0;
    return mul[n]*inv[m]%mod*inv[n-m]%mod;
}

int main()
{
    // freopen("data.txt","r",stdin);
    p[0]=1;
    for(int i=1;i< N;i++)p[i]=p[i-1]*3%mod;
    inv[0]=mul[0]=1;
    for(int i=1;i< N;i++)mul[i]=mul[i-1]*i%mod,inv[i]=q_pow(mul[i],mod-2);
    re(n);re(m);re(k);
    ll ans=0,s1=0,s2=0;
    for(int i=0;i<=m+k;i++)
    {
        if(!i)s1=1;
        else if(i<=m)(s1*=2)%=mod;
        else s1=(((s1-C(m,i-1))*2+C(m,i-1))%mod+mod)%mod;

        if(i-k> 0)(s2=s2*2+C(i-k-1,i-1))%=mod;

        (ans+=C(n-1,n+i-1)*p[m+k-i]%mod*(s1-s2+mod)%mod)%=mod;
    }
    printf("%lld\n",ans);
}
