#include <bits/stdc++.h>

using namespace std;

const int N = 1000005;
const int mod = 1e9+7;

int n, fact[N], inv[N];

int pw(int a, int n) {
    int result = 1;
    while (n > 0) {
        if (n & 1)
            result = (1LL * result * a) % mod;
        a = (1LL * a * a) % mod;
        n /= 2;
    }
    return result;
}

void precalc() {
    fact[0] = inv[0] = 1;
    for (int i = 1; i < N; ++i) {
        fact[i] = (1LL * fact[i - 1] * i) % mod;
        inv[i] = pw(fact[i], mod - 2);
    }
}

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

int main() {
    precalc();
    int a, b, c;
    cin >> a >> b >> c;
    int result = 0;
    int prv = 0, pl, pr;
    for (int len = a; len <= a + b + c; ++len) {
        int n = len - a;
        int cur = 0;
        int l = max(n - c, 0), r = min(b, n);
        if (len == a) {
            cur = 1;
        } else {
            cur = (2 * prv) % mod;
            cur = (cur - C(n - 1, pl) + mod) % mod;
            cur = (cur - C(n - 1, pr) + mod) % mod;
            if (pl == l) cur = (cur + C(n, l)) % mod;
            if (pr < r) cur = (cur + C(n, r)) % mod;
        }
        prv = cur;
        pl = l;
        pr = r;
        cur = (1LL * cur * C(len - 1, a - 1)) % mod;
        cur = (1LL * cur * pw(3, a + b + c - len)) % mod;
        result = (result + cur) % mod;
    }
    cout << result << endl;
    return 0;
}
