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>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
using namespace std;
typedef long long ll;
#define all(v) (v).begin(), (v).end()
#define rep(i, n) for (int i = 0; i < (n); i++)

template <class T = int>
T in() { T x; std::cin >> x; return x; }
#define output(e) std::cout << e << '\n'

#ifdef LOCAL
#define db std::cout << "L" << __LINE__
#define de << "\n"
#define dv(x) << " " << #x << "->" << x
#else
#define db
#define de
#define dv(x)
#endif

//
// Implementation
//

int main() {
  int m = in();
  int f = in();
  int b = in();
  if (b - m > f) {
    output("NA");
  } else {
    output(max(b - m, 0));
  }
}

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

#include <iostream>
#include <algorithm>

using namespace std;

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

C++: #include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <iomanip>
#include <stdio.h>

using namespace std;

//typedefリスト
typedef vector<long long int> vint;
typedef vector<vector<long long int>> vvint;
typedef vector<string> vstr;
typedef long long int llint;

llint gcd(llint x, llint y) {
	while (y != 0) {
		if (x > y) {
			llint r = x % y;
			x = y;
			y = r;
		}
		else {
			llint r = y % x;
			y = r;
		}
	}
	return x;
}

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

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

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

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

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

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

using namespace std;
using llong = long long;
using ldbl = long double;
using P = pair<llong, llong>;

#define ALL(x) x.begin(), x.end()

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

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

	if(m+f < b)
		cout << "NA" << endl;
	else
		cout << (m>=b ? 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 <bits/stdc++.h>
using namespace std;

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)
#define PI 3.14159265358979323846

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

//-----------------------------------------------------------------------------


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

	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 "bits/stdc++.h"

using namespace std;

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

	}
	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 if(m>b)cout<<"0"<<endl;
    else{
        cout<<b-m<<endl;
    }


    return 0;
}

C++: #include <queue>
#include <cstdio>
#include <iostream>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define REP(i,n) for(int i=0;i<n;i++)


int gcd(int a, int b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
int m, f, b;

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

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

}

C++: #include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T &a, T b)
{
    if (a > b)
    {
        a = b;
        return 1;
    }
    return 0;
}
typedef long long int ll;

#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define endl "\n"
const double EPS = 1e-7;
const int INF = 1 << 30;
const ll LLINF = 1LL << 60;
const double PI = acos(-1);
const int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

//-------------------------------------

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

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