Go: package main

import "fmt"

func main() {
	var m, a, book int
	fmt.Scan(&m, &a, &book)

	if nokori := m - book; nokori < 0 {
		if nokori = nokori + a; nokori < 0 {
			fmt.Println("NA")
		} else {
			fmt.Println(a - nokori)
		}
	} else {
		fmt.Println(0)
	}
}

C++: #include <cstdio>
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
using namespace std;

int main()
{
	int m, f, b;
	cin >> m >> f >> b;
	if (m + f > b) {
		cout << "NA" << endl;
	}
	else if (m < f) {
		cout << b - m << endl;
	}
	else {
		cout << 0 << endl;
	}
}

C++: #include<algorithm>
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(void){
	int m,f,b;
	cin>>m>>f>>b;
	if(m+f<b){
		cout<<"NA"<<endl;
	}
	else if(m>=b){
		cout<<"0"<<endl;
	}
	else{
		cout<<abs(b-m)<<endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c;
    cin >> a >>b >>c;
    if(c<=a) cout <<"0"<< endl;
    else
        if(a+b<c) cout<< "NA" << endl;
            else cout << c-a<< endl;
return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    
    int m; 
    int f;
    int b;

    cin >> m;
    cin >> f;
    cin >> b;

    if (m >= b) cout << "0" << endl;
    else if((m + f) < b) cout << "NA" << endl;
    else cout << (m + f) - b << endl; 


    return 0;
}

C++: #include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<stack>
#include<queue>
#include<iomanip>
#include<set>
#include<bitset>
#include <cstdio>
#include <cmath>

using namespace std;

typedef long long ll;
#define put(n) cout<<(n)<<"\n"
#define FOR(i,num,N) for(int(i)=(num);(i)<(N);++(i))
#define RFOR(i,num,N) for(int (i)=(num);(i)>(N);--(i))
#define all(v) (v).begin() , (v).end()
#define rall(v) (v).rbegin() , (v).rend()

int main(){
    int M,F,B;
    cin>>M>>F>>B;
    if(M >= B) cout<<0<<endl;
    else if(M<B && M+F >= B) cout<<B-M<<end;
    else cout<<"NA"<<endl;
}

C++: #include <stdio.h>

int main(void) {

	int a, b, c;

	scanf("%d %d %d", &a, &b, &c);

	if (a >= c) {
		printf("0\n");
	}
	else if ((a + b) < c) {

		printf("NA\n");
	}
	else {
		printf("%d\n", c - a);

	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){

  int a,b,c;
  cin>>a>>b>>c;
  if(a+b<c) cout<<"NA"<<endl;
  else if(a>=c) cout<<0<<endl;
  else cout<<c-a<<endl;
  return 0;

}

C++: #include 
using namespace std;
  
main() {
   int m, f, b;
   cin >> m >> f >> b;

   if ( m >= b ) cout << 0 << endl;
   else if ( m + f >= b ) cout << b - m << endl;
   else cout << "NA" << endl;
return 0;
}

C++: #include<iostream>;

using namespace std;

int main()
{
	int m, f, b;
	cin >> m >> f >> b;
	if (b <= m)
		cout << 0;
	else {
		if (b > f + m)
			cout << "NA";
		else
			cout << b - m;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;

int main(void){
int m,f,b;
cin >> m >> f >> b;
if (m+f<b) cout << "NA" << endl;
else cout << (b>m?b-m:0) << endl;
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void)
{
	int m,f,b;
	cin>>m>>f>>b;
	
	int x=b-m;
	if(m>=b){
		cout<<"0"<<endl;
	}
	else{
		if(x>f){
			cout<<"NA"<<endl;
		}
		else{
			cout<<x<<endl;
		}
	}		
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    if (c <= a)cout << 0 << endl;
    else if (c <= a + b)cout << c - a << endl;
    else cout << "NA" << endl;
    return 0;
}

C++: #include <stdio.h>

int main(void) {

	int a, b, c;

	scanf("%d %d %d", &a, &b, &c);

	if (a >= c) {
		printf("0\n");
	}
	else if ((a + b) <= c) {

		printf("NA\n");
	}
	else {
		printf("%d\n", b - a);

	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int m,f,b;
    cin >> m >> f >> b;
    
    if(b<m){
        cout << 0 << endl;
    }else if(m<b){
        if((m+f)>=b){
            cout << b-m << endl;
        }else{
            cout << "NA" << endl;
        }
    }
}

C++: #include <iostream>
using namespace std;

int main(){
	int m,f,b;
	cin >> m >> f >> b;

		if( m >= b )
		{
		cout << "0" << endl;
		}else{
			if( m + f >= b )
			{
			cout << b - m << endl;
			}else{
			cout << "NA" << endl;
			}
		}

}

C++: #include<stdio.h>
int main(void)
{
	int n,a,x;
	scanf("%d %d %d",&n,&a,&x);
	n=x-n;
	if(n<=0) printf("0\n");
	else if(n<=a) printf("%d\n",n);
	else printf("NA\n");
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
   int m,f,b;
   cin >> m >> f >> b;
   if(m>=b){
       cout << 0;
   }
   else if(m<b&&m+f>=b){
       cout << b-m;
   }
   else{
       cout << "NA";
   }
   cout << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define pb emplace_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
#define PQ(T) priority_queue<T>
#define SPQ(T) priority_queue<T,vector<T>,greater<T>>
#define dame(a) {out(a);return 0;}
#define decimal cout<<fixed<<setprecision(15);
#define dupli(a) a.erase(unique(all(a)),a.end())
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef tuple<ll,ll,ll,ll> PPP;
typedef multiset<ll> S;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
using vvvvi=vector<vvvi>;
using vp=vector<P>;
using vvp=vector<vp>;
using vb=vector<bool>;
using vvb=vector<vb>;
const ll inf=1001001001001001001;
const ll INF=1001001001;
const ll mod=1000000007;
const double eps=1e-10;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';}
template<class T> void outvvp(T v){rep(i,v.size())outvp(v[i]);}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);}
template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
void outs(ll a,ll b){if(a>=inf-100)out(b);else out(a);}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll modpow(ll a,ll b){ll res=1;a%=mod;while(b){if(b&1)res=res*a%mod;a=a*a%mod;b>>=1;}return res;}

int main(){
    ll a,b,c;cin>>a>>b>>c;
    if(a+b<c)dame("NA");
    out(max(0ll,c-a));
}