#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 600005;
int inv[MAX_N], fac[MAX_N], finv[MAX_N];
void make() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX_N; i++) {
    inv[i] = 1000000007 -
             (long long)inv[1000000007 % i] * (1000000007 / i) % 1000000007;
    fac[i] = (long long)fac[i - 1] * i % 1000000007;
    finv[i] = (long long)finv[i - 1] * inv[i] % 1000000007;
  }
}
int comb(int a, int b) {
  if (a < b) {
    return 0;
  }
  return fac[a] * ((long long)finv[b] * finv[a - b] % 1000000007) % 1000000007;
}
inline int add(int x, int y) { return (x + y) % 1000000007; }
inline int sub(int x, int y) { return (x + 1000000007 - y) % 1000000007; }
inline int mul(int x, int y) { return (long long)x * y % 1000000007; }
inline int mod_pow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) {
      res = (long long)res * a % 1000000007;
    }
    a = (long long)a * a % 1000000007;
    b >>= 1;
  }
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, m, K;
  cin >> n >> m >> K;
  if (K > m) swap(m, K);
  make();
  int tm = 0;
  int cri = 1;
  int inv3 = mod_pow(3, 1000000007 - 2);
  int cri2 = mod_pow(inv3, n + 1);
  for (int i = (int)(n + 1); i < (int)(n + K + 1); ++i) {
    tm = add(tm, mul(comb(i - 2, n - 1), mul(cri, cri2)));
    cri = mul(cri, 2);
    cri2 = mul(cri2, inv3);
  }
  cri = mod_pow(2, K);
  for (int i = (int)(n + K + 1); i < (int)(n + m + 2); ++i) {
    tm = add(tm, mul(comb(i - 2, n - 1), mul(cri, cri2)));
    cri = sub(mul(cri, 2), comb(i - n - 1, i - n - K - 1));
    cri2 = mul(cri2, inv3);
  }
  cri = 0;
  for (int i = (int)(m - K + 1); i < (int)(m + 1); ++i) {
    cri = add(cri, comb(m + 1, i));
  }
  for (int i = (int)(n + m + 2); i < (int)(n + m + K + 2); ++i) {
    tm = add(tm, mul(comb(i - 2, n - 1), mul(cri, cri2)));
    cri = sub(mul(cri, 2),
              add(comb(i - n - 1, i - n - K - 1), comb(i - n - 1, m)));
    cri2 = mul(cri2, inv3);
  }
  cout << mul(tm, mod_pow(3, n + m + K + 1)) << "\n";
  return 0;
}
