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 <stdio.h>
#include <iostream>
#include <string>
using namespace std;

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

	cin >> m >> f >> b;

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

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

C++: #include<bits/stdc++.h>
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<bits/stdc++.h>
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 <bits/stdc++.h>

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}
#define Cout(x) cout<<(x)<<endl
#define POSSIBLE(condition) if(condition){cout << "POSSIBLE" << endl;}else{cout << "IMPOSSIBLE" << endl;}
#define Possible(condition) if(condition){cout << "Possible" << endl;}else{cout << "Impossible" << endl;}
#define possible(condition) if(condition){cout << "possible" << endl;}else{cout << "impossible" << endl;}
#define Size(n) (n).size()

typedef long long ll;


using namespace std;

const int INF = 1e9,MOD = 1e9 + 7,ohara = 1e6;
const ll LINF = 1e18;


long long int n,cnt=0,ans=0,a,b,c,d,cmp,cmpp,m,h,w,x,y,sum=0,pos;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

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

      
      cin >> a >> b >> c;
      if(a >= c)Cout(0);
      else{
        ans = c - a;
        if(ans <= b)Cout(ans);
        else Cout("NA");
      }
     

       
return 0;
}

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

using namespace std;

using i64 = int64_t;
const i64 MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;


signed main(){

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

}

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

int main() {
	int a, b,c;
	scanf_s("%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<bits/stdc++.h>
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 a,b,c;
  cin>>a>>b>>c;
  if(a+b<c) cout<<"NA"<<endl;
  else if(a>=b) cout<<0<<endl;
  else cout<<b-a<<endl;
  return 0;

}

C++: #include <stdio.h>


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

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

C++: #include <iostream>

using namespace std;

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

}

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

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

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

C++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
#define chmin(a, b) ((a) = min((a), (b)))
#define chmax(a, b) ((a) = max((a), (b)))
#define fs first
#define sc second
#define eb emplace_back
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

const ll MOD = 1e9 + 7;
const ll INF = 1e18;
const double pi = acos(-1);
const double eps = 1e-10;

int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};

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

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

C++: #include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<P,int> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

int A,B,C;

int main(){
	cin>>A>>B>>C;
	if(A+B>C) cout<<"NA"<<endl;
	else cout<<max(0,C-A)<<endl;
}

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