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(void){
    
   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;
    }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <deque>
#include <numeric>
#include <cmath>
#include <map>
#include <set>
#define ull unsigned long long
#define ll long long
using namespace std;

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

    return 0;
}

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

int m,f,b;


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

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

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

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

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

return 0;
}

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

int main(){
    int m,f,b;
    cin>>m>>f>>b;
    if(b<=m){
        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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define INF 1<<30
#define LINF 1LL<<60

/*
<url:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0358>
?????????============================================================
 ????????????????????\????£????????????°??????????????°???????????°???????????????????????????????????????????????????????????¨??¬?±??????\???????????????
 ???????????????????????????????????¬????????????????????§???????????????????????§?¶????????????¨????????????????????????????????????????????¨?????£???????????????
 ????????§????¶???????????????°???????????????????????????????????????????????????
 
 ?????????????????????????????????????????????????????????????????¬?????????????????????????????¨??????
 ??¬???????????????????????????????????????????????°????????????????°?????????????????????????????????°????????????????????????

=================================================================

?§£??¬=============================================================

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

C++: #include <bits/stdc++.h>
#define px(str) cout<<(str)<<endl,exit(0);
#define pe(str) return cout<<(str)<<endl,0;
#define IF(a,b,c) ((a)?(b):(c))
using namespace std;

int main(int argc,char** argv){
	int a,b,c;
	cin>>a>>b>>c;

	if(a+b<c)px("NA");
	px(IF(a>=c,0,c-a));
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
#define FOR(i, a, n) for(int (i)=(a);(i)<(n);(i)++)
#define eFOR(i, a, n) for(int (i)=(a);(i)<=(n);(i)++)
#define rFOR(i, a, n) for(int (i)=(n)-1;(i)>=(a);(i)--)
#define erFOR(i, a, n) for(int (i)=(n);(i)>=(a);(i)--)
#define SORT(i) sort((i).begin(),(i).end())
#define rSORT(i, a) sort((i).begin(),(i).end(),(a))
#define all(i) (i).begin(),(i).end()
constexpr ll INF = 1000000000;
//constexpr ll LLINF = 1LL << 60;
constexpr ll mod = 1000000007;
constexpr ll MOD = 998244353;

//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;
}

inline void init() {
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
}

template<class T>
inline istream &operator>>(istream &input, vector<T> &v) {
    for (auto &elemnt : v)input >> elemnt;
    return input;
}

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

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

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

	return 0;
}

C++: #include <iostream>
#include <algorithm>
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 <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>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
const long long MOD = 1000000007;
using namespace std;
typedef long long ll;
map<ll, int> mp;
signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	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;
}