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 <iostream>
using namespace std;

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

C++: #include<iostream>
using namespace std;
int m,f,b,k,n;
int main(){
cin>>m>>f>>b;
k=m-b;
n=(m+f)-b;
if(k>0){
    cout<<0<<endl;
}else if(n>=0){
    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 (m >= b) {cout << 0 <<endl;} 
                else
                if (m + f < b){cout << "NA" <<endl;}
                else
                {cout << b - m <<endl;}
                
    return 0;
}

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

C++: #include <iostream>

using namespace std;

int main() {
  int in[3];
  for(int i=0; i<3; i++) {
    cin >> in[i];
  }

  int n = 0;
  if(in[0] >= in[2]) {
    cout << n << endl;
  } else if(in[0]+in[1]-in[2] >= 0) {
    cout << in[1] - in[0] << endl;
  } else {
    cout << "NA" << endl;
  }
  
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

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

C++: #include <stdio.h>
int main(){
    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);
}

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

   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 <iostream>
using namespace std;
typedef long long i64;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()

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

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

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

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

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 <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>

using namespace std;
#define int long long int
const int INF = 1001001001001001LL;

int di[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dj[] = {0, 1, 0, -1, 1, 1, -1, -1};

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <tuple>
#include <unordered_map>
#include <list>
#include <numeric>
#include <utility>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <ctime>
#include <cassert>

#define INF 1000000000
#define LINF 9000000000000000000
#define mod 1000000007

#define rep(i,n) for(int i=0;i<int(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,a,b) for(int i=(a);i<int(b);i++)
#define all(x) (x).begin(),x.end()
#define pb push_back
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long>vll;
typedef pair<int,int> pi;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ddx[8]={-1,-1,0,1,1,1,0,-1};
int ddy[8]={0,1,1,1,0,-1,-1,-1};
bool debug=false;

/*---------------------------------------------------*/

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

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;
return 0;
}

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

C++: #include <bits/stdc++.h>

using namespace std;

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

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

}

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

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <stack>
#include <cmath>
#define ll long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
using namespace std;
//
const int inf=1e9+7;
const int mod=1e9+7;
//
struct poi{
	int X;int Y;int Z;
	bool operator<(const poi&R)const{
		return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
	}
};
//
ll GCD(ll a,ll b){
	return (b==0)?(a):(GCD(b,a%b));
}
ll LCM(ll a,ll b){
	return a/GCD(a,b)*b;
}
//
int main(){
	int M,F,B;
	cin>>M>>F>>B;
	if(M>=B){
		cout<<0<<endl;
	}else if(B-M<=F){
		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+f)

   if(b<=m) cout<< 0 <<endl;
    else
    cout<<b-m<<endl;

  else
   cout<<"NA"<<endl;

  return 0;
}

C++: #include<iostream>
#include<string>

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;
	}
	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define segment_size 65536
#define ROOP() while(true)
int main(){
    int m,f,b;
    cin >> m >> f >> b;
    if(m > b){
        cout << 0 << endl;
    }
    else if(m+f < b){
        cout << "NA" << endl;
    }
    else{
        cout << b-m << endl;
    }
}