#include <bits/stdc++.h>
using namespace std;
int jc[1000001], ny[1000001];
int pw(int x, int y) {
  int ans = 1;
  for (int i = 1; y; i <<= 1, x = 1ll * x * x % 1000000007)
    if (y & i) ans = 1ll * x * ans % 1000000007, y -= i;
  return ans;
}
int main() {
  int n, m, k, z;
  scanf("%d%d%d", &n, &m, &k);
  z = n + m + k;
  if (m > k) swap(m, k);
  for (int i = jc[0] = 1; i <= z; i++) jc[i] = 1ll * i * jc[i - 1] % 1000000007;
  ny[z] = pw(jc[z], 1000000007 - 2);
  for (int i = z; i; i--) ny[i - 1] = 1ll * i * ny[i] % 1000000007;
  int ans = 0, o = 1;
  for (int i = n; i <= z; i++) {
    ans = (ans + (1ll * jc[i - 1] * ny[n - 1] % 1000000007 *
                  ny[(i - 1) - (n - 1)] % 1000000007) *
                     o % 1000000007 * pw(3, z - i)) %
          1000000007;
    o = (o + o) % 1000000007;
    if (i >= n + m)
      o = (o -
           (1ll * jc[i - n] * ny[m] % 1000000007 * ny[(i - n) - (m)] %
            1000000007) +
           1000000007) %
          1000000007;
    if (i >= n + k)
      o = (o -
           (1ll * jc[i - n] * ny[i - n - k] % 1000000007 *
            ny[(i - n) - (i - n - k)] % 1000000007) +
           1000000007) %
          1000000007;
  }
  printf("%d", ans);
}
