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

const int N = 900005;
const int md = 1e9 + 7;

int n, m, k;
int fact[N], inv[N], pw3[N];
int ans;

int pw(int a, int b) {
	int res = 1;
	while(b) {
		if (b & 1) res = 1LL * res * a % md; a = 1LL * a * a % md;
		b >>= 1;
	}
	return res;
}

int C(int n, int k) {
	if (n == k) return 1;
	if (n < 0 || k < 0 || n < k) return 0;
	return 1LL * fact[n] * (1LL * inv[k] * inv[n - k] % md) % md;
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(0);
	cin >> n >> m >> k;

	pw3[0] = 1; for (int i = 1; i < N; ++i) pw3[i] = 3LL * pw3[i - 1] % md;
	fact[0] = 1; for (int i = 1; i < N; ++i) fact[i] = 1LL * fact[i-1] * i % md;
	for (int i = 0; i < N; ++i) inv[i] = pw(fact[i], md - 2);

	int f = 0;
	for (int i = n; i <= n + m + k; ++i) {
		if (i == n) {
			for (int j = i - n - k; j <= m; ++j) f = (f + C(i - n, j)) % md;
		} else {
			f = 2LL * f % md; 
			f = (f - C(i - 1 - n, i - 1 - n - k)) % md; if (f < 0) f += md;
			f = (f - C(i - 1 - n, m)) % md; if (f < 0) f += md;
 		}
 		int cur = 1LL * C(i - 1, n - 1) * pw3[n + m + k - i] % md;
 		cur = 1LL * cur * f % md;
 		ans = (ans + cur) % md;
	}

	cout << ans << '\n';
}