Acka

Count the ways to assign each of S songs to a nonempty subset of three singers so that the three singers get exactly D, K, and H songs.

Medium6CombinatoricsDynamic programmingMathNo attempts yetTime limit2sMemory limit512 MB

Problem

dotorya, kesakiyo, and hongjun7 teach at an algorithm camp. In room 301 they agreed to form the project idol group Acka.

Acka's debut album holds SS songs. Every song has to be sung by at least one of the three. A song may be sung by two of them, and it may be sung by all three.

Given how many songs each person has to record, write a program that counts the ways to make the album.

Two albums A and B are different if there is a song whose singers differ between them.

Input

The first line contains four integers SS, DD, KK, HH, separated by spaces. SS is the number of songs on the album, and DD, KK, HH are the numbers of songs that dotorya, kesakiyo, and hongjun7 have to sing.

1S501 \le S \le 50, 1D,K,HS1 \le D, K, H \le S

Output

Print the number of ways to make the album, modulo 1,000,000,007.