#include <bits/stdc++.h>
using namespace std;
bool chkmin(int &a, int b) { return b < a ? a = b, 1 : 0; }
bool chkmax(int &a, int b) { return b > a ? a = b, 1 : 0; }
inline int read() {
  int x = 0, fh = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') fh = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ '0');
  return x * fh;
}
void File() {}
const int Mod = 1e9 + 7, N = 1e6 + 1e2;
struct Card {
  int a, b, c;
  bool operator<(const Card &rhs) const {
    return (a ^ rhs.a) ? a < rhs.a : (b ^ rhs.b) ? b < rhs.b : c < rhs.c;
  }
};
struct Sta {
  Card pk;
  int val;
};
map<Card, int> M;
vector<Sta> dp[2];
int pow3[N];
int n, m, k, cur;
int ans = 0;
void Update(Card Go, int uv, int dep) {
  if (Go.a < 0) {
    int Last = n + m + k - dep;
    (ans += 1ll * uv * pow3[Last] % Mod) %= Mod;
    return;
  }
  if (Go.b < 0 || Go.c < 0) return;
  int pos = M[Go];
  if (pos) {
    (dp[cur ^ 1][pos - 1].val += uv) %= Mod;
    return;
  }
  dp[cur ^ 1].push_back((Sta){Go, uv});
  M[Go] = (int)dp[cur ^ 1].size();
}
int main() {
  File();
  cin >> n >> m >> k;
  pow3[0] = 1;
  for (int i = (1), iend = (int)(n + m + k); i <= iend; ++i)
    pow3[i] = pow3[i - 1] * 3ll % Mod;
  dp[cur = 0].push_back((Sta){(Card){n - 1, m, k}, 1});
  for (int i = (1), iend = (int)(n + m + k); i <= iend; ++i) {
    for (Sta now : dp[cur]) {
      Card here = now.pk;
      --here.a, Update(here, now.val, i), ++here.a;
      --here.b, Update(here, now.val, i), ++here.b;
      --here.c, Update(here, now.val, i), ++here.c;
    }
    dp[cur].clear();
    cur ^= 1;
    M.clear();
  }
  printf("%d\n", ans);
  return 0;
}
