Problem:
Score : 100 points

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.

Sample Input 1

6 4 3

Sample 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.

Sample Input 2

8 3 9

Sample Output 2

4

Sample Input 3

12 3 7

Sample Output 3

0

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include<iostream>
#include<math.h> 
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#define max(a,b) (a>b ? a : b)
#define min(a,b) (a<b ? a : b)
using namespace std;
typedef long long int lli;
lli mod=1000000007;
vector < lli> primes;

void Sieve(lli n) 
{ 
    bool prime[n+1];
	for(lli i=0;i<n+1;++i)
		prime[i]=true;
    for (lli p=2;p*p<=n;++p) 
    {
        if (prime[p] == true) 
        {  
            for (lli i=2*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    }  
    for(lli p=2; p<=n; p++) 
       if (prime[p]) 
		primes.push_back(p);  
}
lli gcd(lli a,lli b)  
 {
    if(b>a)
        swap(a,b);
    if (a%b==0)  
        return b;  
    else 
        return gcd(a%b,b);  
 }
lli lcm(lli a,lli b)
{
    return (a*b)/gcd(a,b);    
}
lli power(lli x,lli y,lli m)   
{ 
    lli res = 1; 
    x=x%m;   
    while (y > 0) 
    {  
        if (y%2==1) 
            res =(res*x)%m;  
        y=y/2; 
        x=(x*x)%m; 
    } 
    return res; 
}
bool sortcol( const vector<lli>& v1, const vector<lli>& v2 ) 
{ 
	return v1[0] < v2[0]; 
}
int main()
{
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
	lli a,b,c;
	cin>>a>>b>>c;
	lli t=a-b;
	lli ans=c-min(t,c);
	cout<<ans<<endl;
}