#include <bits/stdc++.h>
int A, B, C, S, i;
long long w, an, pw[555555], I[555555];
long long Pw(long long a, long long b, long long p) {
  long long v = 1;
  for (; b; b >>= 1, a = a * a % p)
    if (b & 1) v = v * a % p;
  return v;
}
long long Ce(int x, int y) {
  return pw[y] * I[x] % 1000000007 * I[y - x] % 1000000007;
}
int main() {
  scanf("%d%d%d", &A, &B, &C);
  S = A + B + C;
  for (pw[0] = i = 1; i <= S; i++) pw[i] = 1ll * i * pw[i - 1];
  I[S] = Pw(pw[S], 1000000007 - 2, 1000000007);
  for (i = S; i; i--) I[i - 1] = 1ll * i * I[i] % 1000000007;
  w = 1;
  for (i = A; i <= S; i++) {
    an = (an + Ce(A - 1, i - 1) * w % 1000000007 * Pw(3, S - i, 1000000007)) %
         1000000007;
    w = (w + w) % 1000000007;
    if (i >= A + B) w = (w - Ce(B, i - A) + 1000000007) % 1000000007;
    if (i >= A + C) w = (w - Ce(i - A - C, i - A) + 1000000007) % 1000000007;
  }
  printf("%lld", an);
}
