import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } static final long MODULO = 1_000_000_000 + 7; static final int MAXN = 3000; static long[] fac = new long[2 * MAXN]; static long[] invfac = new long[2 * MAXN]; static long[] inv = new long[2 * MAXN]; { fac[0] = fac[1] = inv[0] = inv[1] = invfac[0] = invfac[1] = 1; for (int i = 2; i < 2 * MAXN; ++i) { fac[i] = fac[i - 1] * i % MODULO; inv[i] = MODULO - inv[(int) MODULO % i] * (MODULO / i) % MODULO; invfac[i] = invfac[i - 1] * inv[i] % MODULO; } } static long comb(int n, int k) { return fac[n] * invfac[n - k] % MODULO * invfac[k] % MODULO; } static long pow(long a, long n) { long ret = 1; for (; n > 0; n >>= 1, a = a * a % MODULO) { if (n % 2 == 1) { ret = ret * a % MODULO; } } return ret; } static void solve(int n, int[] a) { long ans = 0; int t = a[0] + a[1] + a[2]; for (int u = 0; u <= t; u += 2) { int v = t - u; if (u / 2 + v - 1 > n - t) continue; long comb = comb(u / 2 + v + (n - t - (u / 2 + v - 1)), u / 2 + v) * comb(u / 2 + v, v) % MODULO; for (int i = Math.max(0, a[0] - v); i <= Math.min(u / 2, a[0]); ++i) { int a1 = a[1] - (u / 2 - i); int a2 = a[2] - (u / 2 - i); if (a1 < 0 || a2 < 0) continue; long nc = comb * pow(2, u / 2) % MODULO; nc = nc * comb(u / 2, i) % MODULO * comb(v, a[0] - i) % MODULO; nc = nc * comb(a1 + a2, a1) % MODULO; ans = (ans + nc) % MODULO; } } System.out.println(ans); } static void run() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[3]; for (int i = 0; i < 3; ++i) { a[i] = sc.nextInt(); } solve(n, a); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }