P25458 [AtCoder] Video Search
普及
题目描述

Problem Description

The video site operated by Dwango Corporation has $ n $ videos. Niwango-kun searched and found that among them, $ a $ videos have "Dwango" in their titles, and $ b $ videos have "NicoNico" in their titles.

Niwango-kun is curious about how many videos have both "Dwango" and "NicoNico" in their titles. What is the minimum number of such videos that can be said to exist?

Input Format

The input is given from the standard input in the following format:

$ n $ $ a $ $ b $

Output Format

Output the minimum possible number of videos that have both "Dwango" and "NicoNico" in their titles in one line.

Sample Input and Output

Sample Input #1

100 40 35

Sample Output #1

0

Sample Input #2

100 60 70

Sample Output #2

30

Sample Input #3

14000000 2458 692196

Sample Output #3

0

Notes/Hints

Constraints

  • $ 1 ≦ n ≦ 14,000,000 $
  • $ 1 ≦ a ≦ n, 1 ≦ b ≦ n $

Sample Explanation 1

In this case, it is possible that there are no videos with both "Dwango" and "NicoNico" in their titles. For example, among the 100 videos:
- 40 videos have "Dwango" but not "NicoNico".
- 35 videos have "NicoNico" but not "Dwango".
- 25 videos do not have either "Dwango" or "NicoNico" in their titles.

Sample Explanation 3

At the time of the contest (December 17, 2016), the total number of videos on NicoNicoDouga was about 14,000,000.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
100 40 35
样例输出
0