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

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

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

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(void){
    int x,y,z;
    cin>>x>>y>>z;
    if(x>=z){
        cout<<'0'<<endl;
    }

    else if((x+y)<z){
        cout<<"NA"<<endl;
    }
        else{
        cout<<z-x<<endl;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;


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

C++: #include <iostream>

using namespace std;

int n, m, o, ans = 0, A[1010101];
int main() {
	cin >> n >> m >> o;
	if (n + m >= o) o > n ? cout << o - n << endl : cout << 0 << 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(b-m>f){
        cout<<"NA"<<endl;
    }else{
        cout<<max(b-m,0)<<endl;
    }
    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<stdio.h>
int main(void)
{
	int a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	if(a+b<c) printf("NA\n");
	else if(a<c) printf("%d\n",c-a);
	else printf("0\n");
}

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

C++: #include <iostream>

using namespace std;

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

	cin >> m >> f >> b;

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

	return 0;
}

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

int main(){

	int A,B,C;
	scanf("%d %d %d",&A,&B,&C);

	if(A >= C){
		printf("0\n");
	}else if(A+B >= C){
		printf("%d\n",C-A);
	}else{
		printf("NA\n");
	}

	return 0;
}

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

int main() {
  int a, b, c;
  cin >> a >> b >> c;

  int ans;
  int d = c - a;
  if (d < 0) d = 0;

  if (d > b) puts("NA");
  else cout << d << endl;
}

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

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

C++: #include "bits/stdc++.h"

using namespace std;
using uint = unsigned int;
using int64 = long long;
using i64 = int64;
using uint64 = unsigned long long;
using vint = vector<int>;
using vint64 = vector<int64>;
template<typename T>
using p_que = priority_queue<T>;
#define rep(i,N) for(int i=0;i<(int)(N);++i)
#define rep1(i,N) for(int i=1;i<=(int)(N);++i)
#define fs first
#define sc second
#define eb emplace_back
#define all(x) x.begin(),x.end()

template<typename T>
vector<T> make_v(size_t a, T b) { return vector<T>(a, b); }
template<typename... Ts>
auto make_v(size_t a, Ts... ts) {
	return vector<decltype(make_v(ts...))>(a, make_v(ts...));
}

template<class T> ostream& operator<<(ostream& os, const vector<T>& v) {
	os << "[";
	for (auto& e : v) os << e << ", ";
	return os << "]";
}

template<class T, class U> ostream& operator<<(ostream& os, const pair<T, U> p) {
	return os << "P(" << p.first << ", " << p.second << ")";
}

template<class T, class U> ostream& operator<<(ostream& os, const map<T, U>& mp) {
	os << "{";
	for (auto& e : mp) os << e << " ";
	return os << "}";
}

void Main();
signed main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);
	Main();
}

/* Cut from here! */

#define int long long

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

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

int main(){
	int a,b,c;scanf("%d%d%d",&a,&b,&c);
	if(a+b<c)puts("NA");
	else printf("%d\n",max(0,c-a));
}

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

C++: #include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#define INF 2147483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long

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<iostream>
using namespace std;
 
int main(){
  int m,f,b;
  cin>>m>>f>>b;

  if(b<(m+f))endl;

   if(b<=m) cout<< 0 <<endl;
    else
    cout<<b-m<<endl;

  else
   cout<<"NA"<<endl;

  return 0;
}