#include <bits/stdc++.h>

typedef long long LL;
const int N = 1000005, mod = 1000000007;

void reduce(int &x) { x += x >> 31 & mod; }
int pow(int x, int y, int ans = 1) {
	for (; y; y >>= 1, x = (LL) x * x % mod)
		if (y & 1) ans = (LL) ans * x % mod;
	return ans;
}
int factor[N], ifactor[N];
void init(int n) {
	factor[0] = 1;
	for (int i = 1; i <= n; ++i)
		factor[i] = (LL) factor[i - 1] * i % mod;
	ifactor[n] = pow(factor[n], mod - 2);
	for (int i = n; i; --i)
		ifactor[i - 1] = (LL) ifactor[i] * i % mod;
}
int c(int x, int y) { return y < 0 || x < y ? 0 : (LL) factor[x] * ifactor[y] % mod * ifactor[x - y] % mod; }

int n, m, k, pow3[N], g[N], ans;
int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> n >> m >> k, --n, init(n + m + k);
	if (m > k) std::swap(m, k);
	pow3[0] = g[0] = 1;
	for (int i = 1; i <= m + k; ++i) {
		pow3[i] = pow3[i - 1] * 3u % mod;
		g[i] = (g[i - 1] * 2u + mod * 2 - c(i - 1, i - k - 1) - c(i - 1, m)) % mod;
	}
	for (int t = 0; t <= m + k; ++t)
		ans = (ans + (LL) pow3[m + k - t] * c(n + t, n) % mod * g[t]) % mod;
	std::cout << ans << '\n';
	return 0;
}