#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#define MOD 1000000007
using namespace std;

int n, m, k;

int quickPow(int n, int m) {
	int res = 1;
	while (m) {
		if (m & 1) res = 1LL * res * n % MOD;
		m >>= 1;
		n = 1LL * n * n % MOD;
	}
	return res;
}

int main() {
	scanf("%d%d%d", &n, &m, &k);
	if (m > k) swap(m, k);
	int ans = quickPow(3, m + k), tmp1 = 1, tmp2 = 1;
	for (int p = n + 1, e, u = 1, v = 1; p <= n + m + k; ++p) {
		e = quickPow(3, n + m + k - p);
		v = 1LL * v * (p - 1) % MOD * quickPow(p - n, MOD - 2) % MOD;
		if (p <= n + m) u = u * 2 % MOD;
		else if (p <= n + k) {
			tmp1 = p - n - 1 == m ? 1 : 1LL * tmp1 * (p - n - 1) % MOD * quickPow(p - n - m - 1, MOD - 2) % MOD;
			u = (2LL * u - tmp1 + MOD) % MOD;
		}
		else {		
			tmp1 = p - n - 1 == m ? 1 : 1LL * tmp1 * (p - n - 1) % MOD * quickPow(p - n - m - 1, MOD - 2) % MOD;
			tmp2 = p == (1 + n + k) ? 1 : 1LL * tmp2 * (p - 1 - n) % MOD * quickPow(p - n - 1 - k, MOD - 2) % MOD;
			u = (2LL * u - tmp1 - tmp2 + MOD + MOD) % MOD;
		}
		ans = (ans + 1LL * e * v % MOD * u % MOD) % MOD;
	}
	printf("%d\n", ans);
	return 0;
}