#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const int MAXN = 1e6+5;
const ll p = 1e9+7;
const ll inv3 = (p+1)/3;

ll fact[MAXN], invfact[MAXN], inv[MAXN], n, m, k, c[MAXN];
ll p3[MAXN], pinv3[MAXN];

ll comb(int x, int y) {
	if (x < 0 || y < 0 || x < y)
		return 0;
	return fact[x]*invfact[y]%p*invfact[x-y]%p;
}

ll exp(ll x, ll k) {
	if (k == 0)
		return 1;
	ll y = exp(x, k/2);
	return (k%2 == 0) ? y*y%p : y*y%p*x%p;
}

ll inve(ll x) { return exp(x, p-2); }

void init() {
	inv[1] = fact[0] = fact[1] = invfact[0] = invfact[1] = 1;
	for (int i = 2; i < MAXN; ++i) {
		inv[i] = (p - (p/i) * inv[p%i] % p) % p;
		fact[i] = i*fact[i-1]%p;
		invfact[i] = inv[i]*invfact[i-1]%p;
	}

	p3[0] = pinv3[0] = 1;
	for (int i = 1; i < MAXN; ++i)
		p3[i] = 3*p3[i-1]%p, pinv3[i] = inv3*pinv3[i-1]%p;
}

int main() {
	cin >> n >> m >> k;
	init();
	for (int i = 0; i <= k; ++i)
		c[0] = (c[0] + pinv3[i])%p;
	for (int i = 1; i < MAXN-300000; ++i)
		c[i] = 3*(p+1)/2%p*(c[i-1]+p-comb(i+k, k)*pinv3[k+1]%p)%p;
	ll ans = 0;
	for (int i = 0; i <= m; ++i)
		ans = (ans + comb(n-1+i, i)*pinv3[i]%p*c[n-1+i]%p)%p;
	cout << ans*p3[m+k]%p << endl;
}