#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}

#define N 600010

ll inv[N], fact[N], ifact[N];
 
void init_fact(ll n = N){
    inv[1] = 1;
    for(int i = 2; i < n; i++) inv[i] = inv[mod%i] * (mod - mod/i) % mod;
	fact[0] = ifact[0] = 1;
	for(int i = 1; i < n; i++){
		fact[i] = (fact[i-1]*i)%mod;
		ifact[i]=(ifact[i-1]*inv[i])%mod;
	}
}

ll comb(ll a, ll b){
	return fact[a+b]*ifact[a]%mod*ifact[b]%mod;
}

ll comb_nk(ll n, ll k){
	return comb(n-k, k);
}

ll lcm(ll a, ll b){
    return a/__gcd(a, b)*b;
}

ll lambda(ll m){
    ll res = 1;
    if(m%8==0) m /= 2;
    for(ll i = 2; i*i <= m; i++){
        if(!(m%i)){
            ll r = i-1;
            m /= i;
            while(!(m%i)){
                m /= i;
                r *= i;
            }
            res = lcm(res, r);
        }
    }
    if(m>1) res = lcm(res, m-1);
    return res;
}

ll tot(ll m){
	ll res = 1;
	for(ll i = 2; i*i <= m; i++){
		if(!(m%i)){
			res *= i-1;
			m /= i;
			while(!m%i){
				m /= i;
				res *= i;
			}
		}
	}
	if(m>1) res *= m-1;
	return res;
}

ll pow_mod(ll a, ll r, ll m){
	ll x = 1;
	while(r){
		if(r&1) (x*=a)%=m;
		(a*=a)%=m;
		r>>=1;
	}
	return x;
}

int main(){
	ll n, m, k;
	cin>>n>>m>>k;
	n--;
	init_fact();
	ll res = 0, s = 1;
	rep(i, m+k+1){
		ll r = comb(n, i);
		(r*=pow_mod(3, m+k-i, mod))%=mod;
		(res+=r*s)%=mod;
		(s*=2)%=mod;
		if(i>=m)	s -= comb(m, i-m);
		if(i>=k) s -= comb(i-k, k);
	}
	(res+=mod)%=mod;
	cout<<res<<endl;
	return 0;
}
