#include <iostream> 
#include <cstdio> 
#include <cstdlib> 
#include <cstring> 
#include <cmath> 
#include <algorithm> 
using namespace std; 
const int Mod = 1e9 + 7; 
const int MAX_N = 1e6 + 5; 
int fpow(int x, int y) { 
	int res = 1; 
	while (y) { 
		if (y & 1) res = 1ll * res * x % Mod; 
		x = 1ll * x * x % Mod; 
		y >>= 1; 
	} 
	return res; 
} 
int N = 1e6, M, K; 
int fac[MAX_N], ifc[MAX_N]; 
int C(int n, int m) { 
	if (n < m || n < 0 || m < 0) return 0; 
	else return 1ll * fac[n] * ifc[m] % Mod * ifc[n - m] % Mod; 
} 
int main () { 
	fac[0] = 1; for (int i = 1; i <= N; i++) fac[i] = 1ll * fac[i - 1] * i % Mod; 
	ifc[N] = fpow(fac[N], Mod - 2); 
	for (int i = N - 1; ~i; i--) ifc[i] = 1ll * (i + 1) * ifc[i + 1] % Mod; 
	cin >> N >> M >> K; 
	int ans = 0, sum = 1; 
	int pw = fpow(3, M + K), inv3 = fpow(3, Mod - 2); 
	ans = pw; 
	for (int i = 1; i <= M + K; i++) { 
		pw = 1ll * pw * inv3 % Mod; 
		sum = (sum + sum) % Mod; 
		if (i > M) sum = (sum - C(i - 1, i - M - 1) + Mod) % Mod; 
		if (i > K) sum = (sum - C(i - 1, K) + Mod) % Mod; 
		ans = (ans + 1ll * pw * C(N - 1 + i, N - 1) % Mod * sum) % Mod; 
	} 
	printf("%d\n", ans); 
    return 0; 
} 
