#include <bits/stdc++.h>
const bool DEBUG = 1;
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = tuple<ll, ll>;
using P3 = tuple<ll, ll, ll>;
using VI = vector<int>;
using VL = vector<ll>;
using VP = vector<P>;
using VS = vector<string>;
inline int omajinai_int_in() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  return n;
}
inline ll omajinai_ll_in() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;
  cin >> n;
  return n;
}
inline string omajinai_string_in() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string n;
  cin >> n;
  return n;
}
inline int int_in() {
  int n;
  cin >> n;
  return n;
}
inline ll ll_in() {
  ll n;
  cin >> n;
  return n;
}
inline string string_in() {
  string n;
  cin >> n;
  return n;
}
template <typename T>
ostream &operator<<(ostream &o, const vector<T> &v) {
  o << '[';
  for (int i = int(0); i < int((v).size()); ++i)
    o << v[i] << (i != v.size() - 1 ? ", " : "");
  o << "]";
  return o;
}
constexpr int INF = 1e9 + 1;
constexpr ll LINF = 1e18 + 1;
constexpr int MOD = 1e9 + 7;
template <typename T>
function<T(T, T)> constexpr mmin() {
  return [](T x, T y) { return x < y ? x : y; };
}
template <typename T>
function<T(T, T)> constexpr mmax() {
  return [](T x, T y) { return x > y ? x : y; };
}
template <typename T>
function<T(T, T)> constexpr madd() {
  return [](T x, T y) { return x + y; };
}
template <typename T>
function<T(T, T)> constexpr modadd() {
  return [](T x, T y) { return ((x + y) % MOD + MOD) % MOD; };
}
ll ans;
const int N = 3e5 + 1;
ll pascalsum[2 * N];
int add(int a, int b) { return (((a + b) % MOD) + MOD) % MOD; }
int mul(int a, int b) { return (ll)a * b % MOD; }
int pow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
int inv(int a) { return pow(a, MOD - 2); }
int fact[N * 2];
int invFact[N * 2];
int nCr(int n, int r) { return mul(fact[n], mul(invFact[r], invFact[n - r])); }
int main() {
  fact[0] = invFact[0] = 1;
  for (int i = int(1); i < int(N * 2); ++i) {
    fact[i] = (ll)fact[i - 1] * i % MOD;
    invFact[i] = inv(fact[i]);
  }
  int n = int_in(), M = int_in(), K = int_in();
  pascalsum[0] = 1;
  for (int i = int(1); i < int(M + K + 1); ++i) {
    pascalsum[i] = mul(2, pascalsum[i - 1]);
    if (i >= M + 1) pascalsum[i] = add(pascalsum[i], -nCr(i - 1, M));
    if (i >= K + 1) pascalsum[i] = add(pascalsum[i], -nCr(i - 1, i - K - 1));
  }
  for (int t = int(n); t < int(n + M + K + 1); ++t) {
    int T = n + M + K;
    ans += (ll)nCr(t - 1, n - 1) * pow(3, T - t) % MOD * pascalsum[t - n] % MOD;
    ans %= MOD;
  }
  cout << ans << endl;
}
