Олимпиадный тренинг

Задача 34776. cakes


Задача

Темы:
For a festive tea party, you need to buy n cakes. The store sells only two types of cakes, and there are a pieces of cakes of one type, and b pieces of other types of cakes. Cakes of the same type are considered the same. In how many ways can you buy exactly n cakes?

Input data format
The first line of the input contains the number n — the number of cakes to buy, the second and third lines contain the numbers a and b — the number of cakes of each of the two types that are in the store. All numbers — integers, from 1 to 100.

Output data format
The program should output a single integer — number of different ways to buy n cakes.
 
Input Output Note
5
3
10
4 In the example from the condition, there are 4 ways to buy 5 cakes: 0 cakes of the first kind and 5 cakes of the second kind, 1 cake of the first kind and 4 cakes of the second kind, 2 cakes of the first kind and 3 cakes of the second kind, 3 cakes of the first kind and 2 cake of the second kind. There are no other ways, since there are only 3 cakes of the first kind in the store.