#include<bits/stdc++.h>
using namespace std;
using lint = long long;
const int MAXN = 1000005;
const int mod = 1e9 + 7;

lint ipow(int x, int p){
	lint ret = 1, piv = x;
	while(p){
		if(p & 1) ret = ret * piv % mod;
		piv = piv * piv % mod;
		p >>= 1;
	}
	return ret;
}

int n, m, k;
lint fact[MAXN], invf[MAXN];

lint bino(int x, int y){
	return fact[x] * (invf[y] * invf[x - y] % mod) % mod;
}

int main(){
	fact[0] = invf[0] = 1;
	for(int i=1; i<MAXN; i++){
		fact[i] = fact[i-1] * i % mod;
		invf[i] = ipow(fact[i], mod - 2);
	}
	cin >> n >> m >> k;
	lint func = 0;
	for(int j=0; j<=k; j++){
		func += bino(n - 1 + j, j) * ipow(3, mod - 1 - j) % mod;
		func %= mod;
	}
	lint ret = func * ipow(3, m + k) % mod;
	for(int i=1; i<=m; i++){
		lint aux = bino(n - 1 + i + k, k) * ipow(3, mod - 1 - k) % mod;
		func += mod - aux;
		func *= 3ll * (mod + 1) / 2;
		func += aux;
		func %= mod;
		lint base = ipow(3, m + k - i) * bino(n - 1 + i, i) % mod;
		ret += base * func % mod;
		ret %= mod;
	}
	cout << ret << endl;
}

