Discord Reactions
Professor S is preparing for Adelaide Competitive Programming Club's biggest event of the year; the ICPC Preliminaries to qualify for the Regional Finals. However, he has a problem. Lots of people have signed up for the event, which he is excited about, but he is worried about which ones will actually show up on the day. To help with this, he invited everyone to a discord server, and asked them to react to a message if they were coming. Devastatingly, he forgot to differentiate between the two divisions of the event, and now he has no idea how many people are coming for each division!
In preperation, Professor S must prepare stacks of each possible outcome of people coming. For example, if 3 people react, and there are 3 people in division A and 3 people in division B, the possible outcomes are: (3,0), (2,1), (1,2), (0,3). This means he must prepare 4 stacks of materials. Given the number of people who reacted, and the number of people in each division, help Professor S determine the minimum number of stacks he must prepare.
Input
The first line contains an integer , the number of total students that have reacted.
The second line contains an integer , the number of students registered for division A.
The second line contains an integer , the number of students registered for division B.
Output
Output the minimum number of stacks Professor S needs to prepare for the event.
Example
Input 1
6
6
4
Output 1
5
There are 5 possible outcomes: (6,0), (5,1), (4,2), (3,3), (2,4)
Input 2
1
1
2
Output 2
2
There is only 1 possible outcome: (1,1)
Comments