AtCoder Beginner Contest 136
A
Transfer
AtCoder
⌀ 0
原题
←B →
翻译中…

Problem Statement

翻译中…

We have two bottles for holding water.

翻译中…

Bottle $1$ can hold up to $A$ milliliters of water, and now it contains $B$ milliliters of water.

翻译中…

Bottle $2$ contains $C$ milliliters of water.

翻译中…

We will transfer water from Bottle $2$ to Bottle $1$ as much as possible.

翻译中…

How much amount of water will remain in Bottle $2$?

翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $1 \leq B \leq A \leq 20$
  • $1 \leq C \leq 20$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

A B C

翻译中…

Output

翻译中…

Print the integer representing the amount of water, in milliliters, that will remain in Bottle $2$.

翻译中…

样例

Input #1
6 4 3
Output #1
1
We will transfer two milliliters of water from Bottle $2$ to Bottle $1$, and one milliliter of water will remain in Bottle $2$.
Input #2
8 3 9
Output #2
4
Input #3
12 3 7
Output #3
0
题目信息
题号
abc136_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。