#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char now[1 << 16], *S, *T;
  if (T == S) {
    T = (S = now) + fread(now, 1, 1 << 16, stdin);
    if (T == S) return EOF;
  }
  return *S++;
}
inline long long read() {
  register long long x = 0, f = 1;
  char ch = gc();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = gc();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = gc();
  }
  return (f == 1) ? x : -x;
}
long long n, m, L, inv[1010101], fac[1010101];
long long f[1010101], sumf[1010101];
inline long long fast_pow(long long a, long long b, long long p) {
  long long t = 1;
  while (b) {
    if (b & 1ll) t = t * a % p;
    b >>= 1ll;
    a = a * a % p;
  }
  return t;
}
inline long long C(long long n, long long m) {
  if (n < 0 || m < 0) return 0;
  if (m > n) return 0;
  return fac[n] * inv[m] % 1000000007 * inv[n - m] % 1000000007;
}
signed main() {
  n = read(), m = read(), L = read();
  inv[0] = inv[1] = fac[1] = fac[0] = 1;
  long long M = max(n, max(m, L));
  for (long long i = 2; i <= 3 * M + 2; i++)
    fac[i] = fac[i - 1] * i % 1000000007;
  for (long long i = 2; i <= 3 * M + 2; i++)
    inv[i] =
        (1000000007 - (1000000007 / i) * inv[1000000007 % i] % 1000000007) %
        1000000007;
  for (long long i = 2; i <= 3 * M + 2; i++)
    inv[i] = inv[i - 1] * inv[i] % 1000000007;
  long long ans = 0;
  for (int i = 0; i <= m; i++) {
    for (int j = 0; j <= L; j++) {
      if (i == 0 && j == 0)
        ans = (ans + fast_pow(3, m + L, 1000000007)) % 1000000007;
      else if (i == 0) {
        ans = (ans + fast_pow(3, m + L - j, 1000000007) * C(n + j - 1, n - 1) %
                         1000000007) %
              1000000007;
      } else if (j == 0) {
        ans = (ans + fast_pow(3, m + L - i, 1000000007) * C(n + i - 1, n - 1) %
                         1000000007) %
              1000000007;
      } else {
        long long tmp = 0;
        tmp =
            (tmp + C(n + i + j - 2, n - 1) * C(i + j - 1, i - 1) % 1000000007) %
            1000000007;
        tmp = (tmp + C(n + i + j - 2, n - 2) * C(i + j, i)) % 1000000007;
        tmp = (tmp + C(n + i + j - 2, n - 1) * C(i + j - 1, i) % 1000000007) %
              1000000007;
        ans =
            (ans + fast_pow(3, m - i + L - j, 1000000007) * tmp % 1000000007) %
            1000000007;
      }
    }
  }
  cout << ans;
  return 0;
}
