R11

#include <iostream>

using namespace std;

int main()
{
int t,p,n,k;
cin >> t >> p >> n;
if ((t<p) || (t>=p+n)) k=0;
else k=p+n-t;
cout << k << endl;
return 0;
}

Advertisements