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 m,f,b;


int main(){
Y=0;    
cin>>m>>f>>b;

 if (m+f<b)
   Y=NA;
 else
   Y=b-m;
cout<<Y<<endl;

return 0;
}

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

int main() {
	int a, b,c;
	scanf("%d %d %d", &b, &a,&c);
	if (b >= c) printf("0\n");
	else if(a+b>=c) printf("%d\n", c-b);
	else printf("NA\n");
	return 0;
}

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

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

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 a,b,c;
    cin>>a>>b>>c;
    if(a+b<c){
        cout<<"NA"<<endl;
    }
    else if(a<c){
        cout<<c-a<<endl;
    }
    else if(a>c){
        cout<<"0"<<endl;
    }
}

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

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

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll m, f, b;
  cin >> m >> f >> b;
  if(m < b) {
    if((m + f) >= b) {
      cout << b - m << endl;
    } else {
      cout << "NA" << endl;
    }
  } else {
    cout << 0 << endl;
  }
	return 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;
  }
  cout << max(0,b-m) << endl;
}

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


	return 0;
}

C++: //============================================================================
// Name        : JOI.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
ll A,B,C;
int main() {
	cin>>A>>B>>C;
	if(A>=C){
		cout<<0<<endl;
	}else{
		if((A+B)>C){
			cout<<C-A<<endl;
		}else{
			cout<<"NA"<<endl;
		}
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

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

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>=A){
		cout<<(B-M)<<endl;
	}else{
		cout<<"NA"<<endll;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
  
int main(){
  int m,f,b;
    
  cin >> m >> f >> b;
    
  if(b-m > f){
    cout << "NA" << endl;
  }else{
    cout << max(b-m, 0) << 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>
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 <bits/stdc++.h>

using namespace std;

#define int long long
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int, P> Pi;

typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[] = { 0, 0, 1, -1 };
const int dx[] = { 1, -1, 0, 0 };

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

signed main() {
	cin.tie(0);
    ios::sync_with_stdio(false);

	int a, b, c;
	cin >> a >> b >> c;
	if(c > a + b) cout << "NA";
	else cout << c - min(a, c);
	cout << "\n";
	return 0;
}

C++: #include <bits/stdc++.h>
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<<c-a<<endl;
  }else{
    cout<<"NA"<<endl;
  }
  return 0;
}

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

using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int m, f, b;
    cin >> m >> f >> b;
    if (m + f < b) {
        cout << "NA" << '\n';
    } else {
        cout << max(b - m, 0) << '\n';
    }
    return 0;
}

C++: //============================================================================
// Name        : AOL.cpp
// Author      : Akari Fujii
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cctype>
#include <algorithm>
using namespace std;
typedef long long ll;

int main() {


	ll m,t,b;

	cin>>m>>t>>b;


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




}

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

C++: #include "bits/stdc++.h"

using namespace std;
int main(void)
{
	int a, b, c;
	cin >> a >> b >> c;
	if (a >= c)
	{
		cout << "0" << "\n";
	}
	else if (a < c && a+b >= c)
	{
		cout << (c - a) << "\n";
	}
	else if (a < c && a+b < c)
	{
		cout << "NA" << "\n";
	}
}