#include <bits/stdc++.h>

const int MAXN = 300010;
const int mod = 1000000007;
typedef long long LL;
void reduce(int & x) { x += x >> 31 & mod; }
int mul(int a, int b) { return (LL) a * b % mod; }
int pow(int a, int b, int res = 1) {
	for (; b; b >>= 1, a = mul(a, a)) if (b & 1) res = mul(res, a);
	return res;
}
int remod(LL x) { x %= mod; return x + (x >> 63 & mod); }
const int MAXS = 1000010;
int fac[MAXS], inv[MAXS];
int n, m, K;
int C(int a, int b) { return a < b ? 0 :(LL) fac[a] * inv[b] % mod * inv[a - b] % mod; }
int main() {
	std::ios_base::sync_with_stdio(false), std::cin.tie(0);
	fac[0] = fac[1] = inv[0] = inv[1] = 1;
	for (int i = 2; i != MAXS; ++i) {
		fac[i] = mul(fac[i - 1], i);
		inv[i] = mul(inv[mod % i], mod - mod / i);
	}
	for (int i = 2; i != MAXS; ++i) inv[i] = mul(inv[i - 1], inv[i]);
	std::cin >> n >> m >> K;
	int ans = 0, now = 0;
	for (int i = 0; i <= m + K; ++i) {
		reduce(now += now - mod);
		if (i) reduce(now -= C(i - 1, std::min(i - 1, m)));
		if (i > K) reduce(now -= C(i - 1, i - K - 1));
		if (i <= m) reduce(now += 1 - mod);
		reduce(ans += pow(3, m + K - i, mul(C(i + n - 1, n - 1), now)) - mod);
	}
	std::cout << ans << std::endl;
	return 0;
}
