#include #include using namespace std; using namespace atcoder; struct Fast { Fast() { std::cin.tie(nullptr); ios::sync_with_stdio(false); cout << setprecision(10); } } fast; #define all(a) (a).begin(), (a).end() #define contains(a, x) ((a).find(x) != (a).end()) #define rep(i, a, b) for (int i = (a); i < (int)(b); i++) #define rrep(i, a, b) for (int i = (int)(b)-1; i >= (a); i--) #define writejoin(s, a) rep(_i, 0, (a).size()) cout << (a)[_i] << (_i + 1 < (int)(a).size() ? s : "\n"); #define YN(b) cout << ((b) ? "YES" : "NO") << "\n"; #define Yn(b) cout << ((b) ? "Yes" : "No") << "\n"; #define yn(b) cout << ((b) ? "yes" : "no") << "\n"; using ll = long long; using vi = vector; using vvi = vector; using vl = vector; using mint = modint1000000007; using vm = vector; template T extgcd(T a, T b, T& x, T& y) { for (T u = y = 1, v = x = 0; a;) { T q = b / a; swap(x -= q * u, u); swap(y -= q * v, v); swap(b -= q * a, a); } return b; } template T mod_inv(T a, T m) { T x, y; extgcd(a, m, x, y); return (m + x % m) % m; } long long mod_pow(long long a, long long n, long long mod) { long long ret = 1; long long p = a % mod; while (n) { if (n & 1) ret = ret * p % mod; p = p * p % mod; n >>= 1; } return ret; } template std::vector convolution_int32mod(std::vector a, std::vector b) { const long long m1 = 167772161; const long long m2 = 469762049; const long long m3 = 1224736769; const int mod = mint::mod(); std::vector u(a.size()), v(b.size()); for (int i = 0; i < (int)a.size(); i++) u[i] = a[i].val(); for (int i = 0; i < (int)b.size(); i++) v[i] = b[i].val(); auto x = atcoder::convolution(u, v); auto y = atcoder::convolution(u, v); auto z = atcoder::convolution(u, v); const long long m1_inv_m2 = mod_inv(m1, m2); const long long m12_inv_m3 = mod_inv(m1 * m2, m3); const long long m12_mod = m1 * m2 % mod; int n = (int)x.size(); std::vector ret(n); for (int i = 0; i < n; i++) { long long v1 = (y[i] - x[i]) * m1_inv_m2 % m2; if (v1 < 0) v1 += m2; long long v2 = (z[i] - (x[i] + m1 * v1) % m3) * m12_inv_m3 % m3; if (v2 < 0) v2 += m3; long long v3 = (x[i] + m1 * v1 + m12_mod * v2) % mod; if (v3 < 0) v3 += mod; ret[i] = v3; } return ret; } template std::vector convolution_int32mod(std::vector a, std::vector b) { using mint = static_modint; std::vector u(a.size()), v(b.size()); for (int i = 0; i < (int)a.size(); i++) u[i] = a[i]; for (int i = 0; i < (int)b.size(); i++) v[i] = b[i]; auto w = convolution_int32mod(u, v); int n = (int)w.size(); std::vector c(n); for (int i = 0; i < n; i++) c[i] = w[i].val(); return c; } template class Factorial { public: Factorial(int max) : n(max) { f = std::vector(n + 1); finv = std::vector(n + 1); f[0] = 1; for (int i = 1; i <= n; i++) f[i] = f[i - 1] * i; finv[n] = f[n].inv(); for (int i = n; i > 0; i--) finv[i - 1] = finv[i] * i; } mint fact(int k) const { assert(0 <= k && k <= n); return f[k]; } mint fact_inv(int k) const { assert(0 <= k && k <= n); return finv[k]; } mint binom(int k, int r) const { assert(0 <= k && k <= n); if (r < 0 || r > k) return 0; return f[k] * finv[r] * finv[k - r]; } mint inv(int k) const { assert(0 < k && k <= n); return finv[k] * f[k - 1]; } private: int n; std::vector f, finv; }; void solve() { int x, y, z; cin >> x >> y >> z; int n = x + y + z + 1; if (n == 1) { cout << 1 << endl; return; } Factorial fact(n * 3); vm f(n), g(n); rep(i, 0, n) { f[i] = i % 2 == 0 ? fact.fact_inv(i) : -fact.fact_inv(i); if (i) g[i] = fact.fact_inv(i) * fact.binom(x + i - 1, x) * fact.binom(y + i - 1, y) * fact.binom(z + i - 1, z); } f = convolution_int32mod(f, g); mint ans = 0; rep(i, 0, n) ans += f[i] * fact.fact(i); cout << ans.val() << endl; } int main() { int t = 1; // cin >> t; while (t--) solve(); }