#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-12;
long long mae[2000000];
long long gyaku[2000000];
long long powing(long long a, long long b) {
  long long ans = 1;
  while (b != 0) {
    if (b % 2 == 1) {
      ans *= a;
      ans %= 1000000007LL;
    }
    a *= a;
    a %= 1000000007LL;
    b /= 2;
  }
  return ans;
}
long long inv(long long now) { return powing(now, 1000000007LL - 2LL); }
long long combination(long long a, long long b) {
  long long ans = mae[a];
  ans *= gyaku[a - b];
  ans %= 1000000007LL;
  ans *= gyaku[b];
  ans %= 1000000007LL;
  return ans;
}
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  mae[0] = 1;
  gyaku[0] = 1;
  for (long long i = 1; i <= a + b + c; ++i) {
    mae[i] = mae[i - 1] * i;
    mae[i] %= 1000000007LL;
    gyaku[i] = inv(mae[i]);
  }
  long long ans = 0;
  for (long long i = a; i <= a + (b) + (c); ++i) {
    long long first_multiply = powing(3LL, a + b + c - i);
    first_multiply *= combination(i - 1, a - 1);
    first_multiply %= 1000000007LL;
    long long second_multiply = 0;
    for (long long q = 0; q <= b; ++q) {
      long long geko = i - a - q;
      if (geko < 0) break;
      if (geko > c) continue;
      second_multiply += combination(i - a, q);
      second_multiply %= 1000000007LL;
    }
    ans += first_multiply * second_multiply;
    ans %= 1000000007LL;
  }
  cout << ans << endl;
}
