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;

#define ASC(vec) vec.begin(), vec.end()    // 昇順ソート 例：sort(ASC(vec));
#define DESC(vec) vec.rbegin(), vec.rend() // 降順ソート 例：sort(DESC(vec));
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Rep(i, n) for (int i = 1; i < n; i++)
#define REP(i, vec) for (auto i = vec.begin(); i != vec.end(); ++i)

const int       mod = 1000000007;
const int       inf = (1 << 21);
const long long INF = 1LL << 60;

using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vb = vector<bool>;
using vl = vector<ll>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vii = vector<pair<int, int>>;
using vll = vector<pair<ll, ll>>;

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; }
template<class T>
T GCD(T a, T b) { if (b == 0) return a; else return GCD(b, a % b); }
template<class T>
T LCM(T a, T b) { return a / GCD(a, b) * b; }

constexpr array<int, 9> dx = { 0, 1, 0, -1, -1, 1, 1, -1, 0 };
constexpr array<int, 9> dy = { 1, 0, -1, 0, 1, 1, -1, -1, 0 };

// ──────────────────────────────────────────────────────────────────

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

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

C++: #include <iostream>
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<stdio.h>
int main(void)
{
	int m,f,b,x,n;
	scanf("%d",&m);
	scanf("%d",&f);
	scanf("%d",&b);
	x=m-b;
	if(x<0 && f+x<0){
		printf("NA\n");
	}
	else if(x<0 && f+x>=0){
		n=-x;
		printf("%d\n",n);
	}
	else{
		printf("%d\n",0);
	}
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int,int>
#define MA make_pair
#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--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
//
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>
uisng 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;
	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 rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1LL<<30;

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;
    } else {
        cout << "NA" << endl;
    }

    return 0;
}

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

using namespace std;

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

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

C++: #include<stdio.h>
int main()
{
	int m,f,b,r;
	scanf("%d%d%d",&m,&f,&b);
	r=b-m;
	if(r>0&&f>=r){
		printf("%d\n",r);
	}else if(r>0&&f<r){
		printf("NA\n");
	}else{
		printf("%d\n",0);
	}
	return 0;
}

C++: 
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#include<iomanip>
#include<iterator>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,a,n) for(int i=a; i<n; i++)

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, char> plc;


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 <stdio.h>

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

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

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

int main(){
    long int a,b,c,sum,num;
    cin >> a >> b >>c;
    sum=a+b;

    if(sum>=c&&a>c){
        cout<<0<<endl;
    }
    else if(sum>=c){
        num=c-a;
        cout<<num<<endl;
    }
    else{
        cout<<"NA"<<endl;
    }
    
   return 0;
}

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

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

}

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

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

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