#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 900010;
int n, m, k;
long long fac[N], ifac[N], p[N];
long long mul(long long x, long long y) { return (1ll * x * y) % mod; }
long long add(long long x, long long y) { return (x + y) % mod; }
long long power(long long a, long long b) {
  int ans = 1, base = a;
  while (b) {
    if (b & 1) ans = mul(ans, base);
    base = mul(base, base);
    b >>= 1;
  }
  return ans;
}
long long inv(long long x) { return power(x, mod - 2) % mod; }
long long C(long long x, long long y) {
  return (fac[x] * ifac[y] % mod * ifac[x - y] % mod) % mod;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  fac[0] = 1ll;
  p[0] = 1ll;
  for (int i = 1; i < N; i++) {
    fac[i] = fac[i - 1] * i % mod;
    p[i] = p[i - 1] * 3ll % mod;
  }
  for (int i = 0; i < N; i++) {
    ifac[i] = inv(fac[i]);
  }
  long long ans = 0, x = 1ll;
  n--;
  if (k > m) swap(k, m);
  for (int i = 0; i <= m + k; i++) {
    ans = (ans + C(n + i, n) * p[m + k - i] % mod * x) % mod;
    for (int j = 0; j <= min(i, m - 1); j++) {
      if (i - j < k)
        x = add(x, C(i, j));
      else if (i - j < m)
        x = add(x, C(i, i - k + 1));
    }
  }
  printf("%lld\n", add(ans, mod));
  return 0;
}
