#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <deque>
#include <stack>
#include <iomanip>
#include <cmath>


using namespace std;


typedef long long ll;
typedef long double ld;


const ll MOD = 1000000007ll;


ll modSum(ll a, ll b) {
  return ((a % MOD) + (b % MOD)) % MOD;
}


ll modSubtract(ll a, ll b) {
  return (((a % MOD) - (b % MOD)) + MOD + MOD) % MOD;
}


ll modProd(ll a, ll b) {
  return ((a % MOD) * (b % MOD)) % MOD;
}


ll getPowMod(ll x, ll e) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    ll tmp = getPowMod(x, e/2);
    return modProd(tmp, tmp);
  } else {
    ll tmp = getPowMod(x, e-1);
    return modProd(tmp, x);
  }
}


ll getPow(ll x, ll e) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    ll tmp = getPow(x, e/2);
    return tmp * tmp;
  } else {
    ll tmp = getPow(x, e-1);
    return tmp * x;
  }
}

ll getInverse(ll x) {
  return getPowMod(x, MOD-2);
}


bool isEven(ll x) {
  ll tmp = ((x % 2) + 2) % 2;
  return tmp == 0;
}


ll getSumOfDigitsInBase(ll n, ll b) {
  ll ret = 0;
  while (n > 0) {
    ret += n % b;
    n /= b;
  }
  return ret;
}


vector<int> getKMP(string &s) {
  int len = (int)s.size();
  vector<int> ret (len, 0);
  for (int i = 1 ; i < len ; i++) {
    int at = ret[i-1];
    while (at > 0 && s[i] != s[at]) {
      at = ret[at-1];
    }
    if (s[i] == s[at]) {
      at++;
    }
    ret[i] = at;
  }
  return ret;
}


string getSubstring(string &s, int from, int to) {
  int l = to-from+1;
  if (l <= 0) {
    return "";
  }
  return s.substr(from, l);
}
















int N, M, K;


void input() {
  cin >> N >> M >> K;
  // We require M <= K
  if (M > K) {
    swap(M, K);
  }
}


void preprocess() {
}


void solve() {
  ll ans = 0;
  ll v1 = 1, v2 = 1, tmp1 = 1, tmp2 = 1;
  for (int len = N ; len <= N+M+K ; len++) {
    cerr << "Len = " << len << "\n";
    int bad = len - N;
    if (len == N) {
      v1 = 1;
    } else {
      v1 = modSum(v1, v1);
    }
    if (bad-1 >= M) {
      if (bad-1 > M) {
        tmp1 = modProd(tmp1, modProd(bad-1, getInverse(bad-1-M)));
      }
      v1 = modSubtract(v1, tmp1);
    }
    if (bad-1 >= K) {
      if (bad-1 > K) {
        tmp2 = modProd(tmp2, modProd(bad-1, getInverse(bad-1-K)));
      }
      v1 = modSubtract(v1, tmp2);
    }
    if (len > N) {
      v2 = modProd(v2, modProd(len-1, getInverse(len-1-(N-1))));
    }
    ll mul = v1;
    mul = modProd(mul, v2);
    mul = modProd(mul, getPowMod(3, N+M+K-len));
    ans = modSum(ans, mul);
    /* 
    cerr << "tmp1 = " << tmp1 << "\n";
    cerr << "tmp2 = " << tmp2 << "\n";
    cerr << "V1 = " << v1 << "\n";
    cerr << "V2 = " << v2 << "\n";
    cerr << "Bad = " << bad << "\n";
    cerr << "Mul = " << mul << "\n";
    cerr << "Ans = " << ans << "\n";
    */
  }
  cout << ans;
}


int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);

  int T;
//  cin >> T;
  T = 1;

  for (int i = 0 ; i < T ; i++) {
    input();
    preprocess();
    solve();
  }

  return 0;
}
/* 
Len = 4
V1 = 1
V3 = 1
V2 = 1
Bad = 0
Mul = 81
Ans = 81
Len = 5
V1 = 1
V3 = 1
V2 = 4
Bad = 1
Mul = 216
Ans = 297
Len = 6
V1 = 1
V3 = 1
V2 = 10
Bad = 2
Mul = 360
Ans = 657
Len = 7
V1 = 1
V3 = 1
V2 = 20
Bad = 3
Mul = 360
Ans = 1017
Len = 8
V1 = 4
V3 = 4
V2 = 35
Bad = 4
Mul = 0
Ans = 1017
1017
*/

Measured memory_bytes: 256