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 "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(ll i=a;i<b;++i)
#define rep(...) _overload3(__VA_ARGS__,_repi,_rep)(__VA_ARGS__)
#define _rrepi(i,a,b) for(ll i=b-1;i>=a;i--)
#define _rrep(i,n) _rrepi(i,0,n)
#define rrep(...) _overload3(__VA_ARGS__,_rrepi,_rrep)(__VA_ARGS__)
#define sum(...) accumulate(range(__VA_ARGS__),0)
#define _range(i) (i).begin(),(i).end()
#define _rangek(i,k) (i).begin(),(i).begin()+k
#define range(...) _overload3(__VA_ARGS__,a,_rangek,_range)(__VA_ARGS__)
#define LINF (ll)1000000000000000000
#define MOD (ll)1000000007
#define INF (int)1000000007
#define Yes(i) out(i?"Yes":"No")
#define YES(i) out(i?"YES":"NO")
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;in(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;in(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;in(__VA_ARGS__)
#define vec(type,name,size) vector<type> name(size);
#define VEC(type,name,size) vector<type> name(size);in(name)
struct aaa{aaa(){cin.tie(0); cout.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(15);};}aaaaaaa;
inline void in() {}
template<typename T>
istream& operator >> (istream& is, vector<T>& vec);
template<typename T,typename L>
istream& operator >> (istream& is, pair<T,L>& p);
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec);
template<typename T,typename L>
ostream& operator << (ostream& os, pair<T,L>& p);
template<typename T>
istream& operator >> (istream& is, vector<T>& vec){for(T& x: vec) is >> x;return is;}
template<typename T,typename L>
istream& operator >> (istream& is, pair<T,L>& p){is >> p.first;is >> p.second;return is;}
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec){os << vec[0];rep(i,1,vec.size()){os << ' ' << vec[i];}return os;}
template<typename T,typename L>
ostream& operator << (ostream& os, pair<T,L>& p){os << p.first << " " << p.second;return os;}
template <class Head, class... Tail>
inline void in(Head&& head,Tail&&... tail){cin>>head;in(move(tail)...);}
template <class T>
inline void out(T t){cout<<t<<'\n';}
template <class Head, class... Tail>
inline void out(Head head,Tail... tail){cout<<head<<' ';out(move(tail)...);}


int main(){
    INT(a,b,c);
    if(c>a+b)out("NA");
    else out(max(c-a,0));
}

C++: #include <iostream>

using namespace std;

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

    if (m >= b)
    {
        cout << 0 << endl;
        return 0;
    }

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

    cout << "NA" << endl;
}

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

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

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cstring>
#include<math.h>
#include<bitset>
#include<queue>
#include<set>
#include<iomanip>
#include<math.h>
#include<assert.h>
#include<string>
#include<cstdlib>
#include<cctype>
#include<unordered_map>
#include<sstream>
#include<numeric>
#include<stack>
// #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
constexpr ll INF = 1LL<<60;
const double INFD = 1e100;
const ll mod = 1000000007;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
};
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
};

// intやllをstringに変換
template<typename T> inline string toString(const T &a){
  ostringstream oss;
  oss << a;
  return oss.str();
};
// ----------------------------------------------------------------------------

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 <algorithm>
#include <iostream>
#include <numeric>
using namespace std;

int a,b,c;

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


	return 0;
}

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

int m,f,b;


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

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

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

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(i,x) for(auto i=(x).begin(); i!=(x).end();i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vec vector
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};

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<iostream>
using namespace std ;
int main()
{
	int m=0 , f=0 , b=0 ;
	cin >> m >> f >> b ;
	if(m+f<b) cout << "NA" << endl ;

	if(m>=b) cout << 0 << endl ;

	if(m<=b&&m+f>b) cout << b-m << endl ;

	return 0 ;
}

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 + f >= b) {
		cout << b - m << endl;
	} else {
		cout << "NA" << endl;
	}
	return 0;
}

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

C++: #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main(){
    int a,b,c;
	cin >> a >> b >> c;
	if (a + b >= c){
		cout<<(c-a >= 0 ? c-a : 0 )<<endl;
	}else{
		cout<<"NA"<<endl;
	}
}