Time

13:01:47
23 May 2012
Version for print

The Candies

   Ivanko likes candies very much. He has a lot of candies and he keeps them in the special small boxes. All Ivanko has N candies (N is even) and S of identical small boxes. In one small box placed no more then N/2 of candies. It became interestingly to Ivanko, by how many methods he can decompose candies to small boxes... Help him to find an answer for his question.

   Be attention, that all of candies are identical, that is why matters only the quantity of candies in each of the small boxes. That is means that you decompose candies to small boxes with two different methods if though in one of small boxes the quantity of candies in the small boxes with first methods differs from the quantity of candies in the small boxes with second methods (in tha same small box).


Specifications

   Input

   There are two numbers N and S in the first line. 2N1000 is a quantity of the candies, N - even; 2S1000 - is a quantity of small boxes.

   Output

   There is a one number. It is a quantity of different possible methods of decompose candies on small boxes.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 3.33333
Complexity: 81% 11/59
Classes: Combinatorics

Example

Example input

4 3

Example output

6


← The Timetable from "Diez-Product" Problems The Directors’ Visitors →