#include #define loop(n) for (int ngtkana_is_genius = 0; ngtkana_is_genius < int(n); ngtkana_is_genius++) #define rep(i, begin, end) for(int i = int(begin); i < int(end); i++) #define all(v) v.begin(), v.end() #define rand(l, r) std::uniform_int_distribution<>(l, r)(mt) #define lint long long auto cmn = [](auto& a, auto b){if (a > b) {a = b; return true;} return false;}; auto cmx = [](auto& a, auto b){if (a < b) {a = b; return true;} return false;}; void debug_impl() { std::cerr << std::endl; } template void debug_impl(Head head, Tail... tail){ std::cerr << " " << head; debug_impl(tail...); } #ifndef STOPIT #define debug(...)\ std::cerr << std::boolalpha << "[" << #__VA_ARGS__ << "]:";\ debug_impl(__VA_ARGS__);\ std::cerr << std::noboolalpha; #else #define debug 0; #endif template T inverse(T a, T m) { T u = 0, v = 1; while (a != 0) { T t = m / a; m -= t * a; std::swap(a, m); u -= t * v; std::swap(u, v); } assert(m == 1); return u; } template class modular { private: int value; public: constexpr modular() = default; constexpr modular(const modular&) = default; constexpr modular(modular&&) = default; modular& operator=(const modular&) = default; modular& operator=(modular&&) = default; template modular (const U& x) {value = normalize(x);} template static auto normalize(const U& x) { int v = static_cast(-mod() <= x && x < mod() ? x : x % mod()); if (v < 0) v += mod(); return v; } auto const& operator()() const { return value; } template explicit operator U() const { return static_cast(value); } constexpr static auto mod() { return T::value; } auto& operator+=(const modular& other) { if ((value += other.value) >= mod()) value -= mod(); return *this; } auto& operator-=(const modular& other) { if ((value -= other.value) < 0) value += mod(); return *this; } template auto& operator+=(const U& other) {return *this += modular(other); } template auto& operator-=(const U& other) {return *this -= modular(other); } auto operator-() const { return modular(-value); } auto& operator++() {return *this += 1;} auto& operator--() {return *this -= 1;} auto operator++(int) {modular result(*this); operator++(); return result;} auto operator--(int) {modular result(*this); operator--(); return result;} template auto& operator*=(const modular& rhs) { value = normalize(static_cast(value) * static_cast(rhs.value)); return *this; } auto& operator/=(const modular& other) { return *this *= modular(inverse(other.value, mod())); } }; template struct is_modular : std::false_type {}; template struct is_modular > : std::true_type{}; template constexpr bool is_modular_v = is_modular::value; template bool operator==(const modular& lhs, const modular& rhs) { return lhs() == rhs(); } template bool operator==(const modular& lhs, U rhs) { return lhs == modular(rhs); } template bool operator==(U lhs, const modular& rhs) { return modular(lhs) == rhs; } template bool operator!=(const modular& lhs, const modular& rhs) { return !(lhs == rhs); } template bool operator!=(const modular& lhs, U rhs) { return !(lhs == rhs); } template bool operator!=(U lhs, const modular& rhs) { return !(lhs == rhs); } template modular operator+(const modular& lhs, const modular& rhs) { return modular(lhs) += rhs; } template modular operator+(const modular& lhs, U rhs) { return modular(lhs) += rhs; } template modular operator+(U lhs, const modular& rhs) { return modular(lhs) += rhs; } template modular operator-(const modular& lhs, const modular& rhs) { return modular(lhs) -= rhs; } template modular operator-(const modular& lhs, U rhs) { return modular(lhs) -= rhs; } template modular operator-(U lhs, const modular& rhs) { return modular(lhs) -= rhs; } template modular operator*(const modular& lhs, const modular& rhs) { return modular(lhs) *= rhs; } template modular operator*(const modular& lhs, U rhs) { return modular(lhs) *= rhs; } template modular operator*(U lhs, const modular& rhs) { return modular(lhs) *= rhs; } template modular operator/(const modular& lhs, const modular& rhs) { return modular(lhs) /= rhs; } template modular operator/(const modular& lhs, U rhs) { return modular(lhs) /= rhs; } template modular operator/(U lhs, const modular& rhs) { return modular(lhs) /= rhs; } template modular power (const modular& a, U b) { assert(b >= 0); modular x = a, ret = 1; for (; b > 0; b /= 2) { if (b % 2 == 1) ret *= x; x *= x; } return ret; } template std::string to_string(const modular& a) { return std::to_string(a()); } template auto operator<<(std::ostream& os, const T& a) -> std::enable_if_t, std::ostream&>{ return os << a(); } template auto operator>>(std::istream& is, T& a) -> std::enable_if_t, std::istream&> { long long x; is >> x; a = T(x); return is; } using mod_type = int; // struct variable_mod { static mod_type value; }; // mod_type variable_mod::value; // mod_type& mod = variable_mod::value; // using mint = modular< variable_mod >; constexpr int mod = 1'000'000'007; using mint = modular, mod>>; template < typename Container, typename Value = typename Container::value_type, std::enable_if_t::value, std::nullptr_t> = nullptr> std::istream& operator>> (std::istream& is, Container& v) { for (auto & x : v) { is >> x; } return is; } template < typename Container, typename Value = typename Container::value_type, std::enable_if_t::value, std::nullptr_t> = nullptr > std::ostream& operator<< (std::ostream& os, Container const& v) { os << "{"; for (auto it = v.begin(); it != v.end(); it++) {os << (it != v.begin() ? "," : "") << *it;} return os << "}"; } template < typename Value > class factorials { std::vector< Value > fact, finv; public: factorials()=default; void build(int n) { fact.resize(n), finv.resize(n); fact.at(0) = 1; for (int i = 1; i < n; i++) fact.at(i) = fact.at(i - 1) * Value(i); finv.at(n - 1) = Value(1) / fact.at(n - 1); for (int i = n - 2; i >= 0; i--) finv.at(i) = finv.at(i + 1) * Value(i + 1); } auto operator() (int i) const {return fact.at(i);} auto inv (int i) const {return finv.at(i);} auto binom(int i, int j) const { assert(0 <= i); if (j < 0 ||i < j) return Value(0); return fact.at(i) * finv.at(j) * finv.at(i - j); } auto deal(int i, int j) const { return binom(i + j - 1, j - 1); } }; int main() { std::cin.tie(0); std::cin.sync_with_stdio(false); int a, b, c; std::cin >> a >> b >> c; auto n = a + b + c; auto fact = factorials< mint >(); fact.build(n + 1); std::vector< mint > dp(n + 1, -1); dp.at(c - 1) = 0; rep(j, c - 1, n - 2) { // debug(j); if (j == 0) { dp.at(j + 1) = dp.at(j) + 1; continue; } auto p = power(mint(2), j); auto x = fact.binom(j, c - 1); auto y = p + (mint(c - 1) / j) * (p - 1); // debug(j, x, y); dp.at(j + 1) = dp.at(j) + x * y; } // debug(dp); auto ret = mint(0); rep(i, b + c - 1, n - 1) { auto x = fact.binom(i - c, b - 1); auto y = dp.at(i); // debug(i, x, y); ret += x * y; } std::cout << ret << std::endl; return 0; }