#include using namespace std; using i64 = long long; #define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++) #define rev(i,s,e) for(i64 (i) = (s);(i) --> (e);) #define all(x) x.begin(),x.end() #include using namespace std; using i64 = long long; template struct modint { i64 a; constexpr modint(const i64 x = 0) noexcept: a((x % M + M) % M) {} constexpr i64 value() const noexcept { return a; } constexpr modint pow(i64 r) const noexcept { modint ans(1); modint aa = *this; while(r) { if(r & 1) { ans *= aa; } aa *= aa; r >>= 1; } return ans; } constexpr modint& operator+=(const modint r) noexcept { a += r.a; if(a >= M) a -= M; return *this; } constexpr modint& operator=(const i64 r) { a = (r % M + M) % M; return *this; } constexpr modint& operator-=(const modint r) noexcept { a -= r.a; if(a < 0) a += M; return *this; } constexpr modint& operator*=(const modint r) noexcept { a = a * r.a % M; return *this; } constexpr modint& operator/=(modint r) noexcept { i64 ex = M - 2; while(ex) { if(ex & 1) { *this *= r; } r *= r; ex >>= 1; } return *this; } constexpr modint operator+(const modint r) const { return modint(*this) += r; } constexpr modint operator-(const modint r) const { return modint(*this) -= r; } constexpr modint operator*(const modint r) const { return modint(*this) *= r; } constexpr modint operator/(const modint r) const { return modint(*this) /= r; } }; using fp = modint<(i64)1e9 + 7>; template struct combination { vector fact; vector inv; combination(i64 n) : fact(n), inv(n) { fact[0] = T(1); for(i64 i = 1;i < n;i++) fact[i] = fact[i - 1] * T(i); inv[n - 1] = T(1) / fact[n - 1]; for(i64 i = n - 1;i --> 0;) inv[i] = inv[i + 1] * T(i + 1); } T binom(i64 n, i64 k) const { if(k < 0 || n < k) return T(0); else return fact[n] * inv[k] * inv[n - k]; } T H(i64 n, i64 k) const { return binom(n + k - 1, k); }; T factor(i64 i) const { return fact[i]; } }; int main() { i64 X, Y, Z; cin >> X >> Y >> Z; if(X == 0 && Y == 0 && Z == 0) { cout << 1 << endl; return 0; } combination com(X + Y + Z + 10); fp f(0); { fp bit(1); rep(i,0,X + Y + Z + 1) { f += bit; bit *= fp(2); } } fp ans(0); rep(j,0,X + Y + Z + 1) { fp coe = com.binom(j, X) * com.binom(j, Y) * com.binom(j, Z); if((j + X + Y + Z) & 1) coe *= -1; ans += coe * f; f = fp(-2) * f + fp(2).pow(X + Y + Z + 1) * com.binom(X + Y + Z + 1, j + 1); } cout << (ans / fp(2)).value() << endl; }