Gaius Julius Caesar, a famous general, loved to line up his soldiers. Overall the army had *n*_{1} footmen and *n*_{2} horsemen. Caesar thought that an arrangement is not beautiful if somewhere in the line there are strictly more that *k*_{1} footmen standing successively one after another, or there are strictly more than *k*_{2} horsemen standing successively one after another. Find the number of beautiful arrangements of the soldiers.

Note that all *n*_{1} + *n*_{2} warriors should be present at each arrangement. All footmen are considered indistinguishable among themselves. Similarly, all horsemen are considered indistinguishable among themselves.

The only line contains four space-separated integers *n*_{1}, *n*_{2}, *k*_{1}, *k*_{2} (1 ≤ *n*_{1}, *n*_{2} ≤ 100, 1 ≤ *k*_{1}, *k*_{2} ≤ 10) which represent how many footmen and horsemen there are and the largest acceptable number of footmen and horsemen standing in succession, correspondingly.

提交代码