#include<bits/stdc++.h>

#define LL long long
#define RG register

using namespace std;
template<class T> inline void read(T &x) {
	x = 0; RG char c = getchar(); bool f = 0;
	while (c != '-' && (c < '0' || c > '9')) c = getchar(); if (c == '-') c = getchar(), f = 1;
	while (c >= '0' && c <= '9') x = x*10+c-48, c = getchar();
	x = f ? -x : x;
	return ;
}
template<class T> inline void write(T x) {
	if (!x) {putchar(48);return ;}
	if (x < 0) x = -x, putchar('-');
	int len = -1, z[20]; while (x > 0) z[++len] = x%10, x /= 10;
	for (RG int i = len; i >= 0; i--) putchar(z[i]+48);return ;
}
const int N = 600010, Mod = 1e9 + 7;
int fac[N], ifac[N];
int fpow(int a, int b) {
	int res = 1;
	for (; b; b >>= 1, a = 1ll * a * a % Mod)
		if (b & 1) res = 1ll * res * a % Mod;
	return res;
}
int C(int n, int m) {
	if (n < m) return 0;
	if (m < 0) return C(n - m - 1, -m);
	return 1ll * fac[n] * ifac[n - m] % Mod * ifac[m] % Mod;
}
int n, m, k;
int calc(int t) {
	int res = 0;
	for (int j = 0; j < max(0, t - k); j++)
		printf("%d ", C(t, j));
	for (int i = max(0, t - k); i <= m; i++) {
		res = (res + C(t, i)) % Mod;
		printf("%d ", C(t, i));
	}
	puts("");
	return res;
}
int main() {
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	read(n), read(m), read(k);
	fac[0] = 1;
	for (int i = 1; i <= N - 10; i++) fac[i] = 1ll * fac[i - 1] * i % Mod;
	ifac[N - 10] = fpow(fac[N - 10], Mod - 2);
	for (int i = N - 10; i >= 1; i--) ifac[i - 1] = 1ll * ifac[i] * i % Mod;
	LL ans = fpow(3, m + k), S = 1;
	for (int t = 1; t <= m + k; t++) {
		S = (2 * S % Mod - C(t - 1, m) + Mod) % Mod;
		if (t - k > 0) S = (S - C(t - 1, t - k - 1) + Mod) % Mod;
		ans = (ans + 1ll * fpow(3, m + k - t) * C(t + n - 1, n - 1) % Mod * S % Mod) % Mod;
	}
	printf("%lld\n", ans);
	return 0;
}
