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 <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;

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

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <string.h>
#include <cmath>
#include <set>
#include<list>
#include <map>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define ALL(v) v.begin(),v.end()
#define RALL(v) v.rbegin(),v.rend()
#define check(v) rep(i,v.size()) cout << v[i] << " ";\
cout << endl
#define INF 1e9
typedef long long ll;
using namespace std;

int main() {
    int m, m2, b; cin >> m >> m2 >> b;
    if(m>=b) {
        cout << 0 << endl;
    }
    else if(m+m2<b) {
        cout << "NA" << 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(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 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 <bits/stdc++.h>
using namespace std;

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

C++: #include<iostream>
#include<stdio.h>
#include<string>
#include<cmath>
#include<math.h>
#include<vector>
#include<algorithm>
#include<map>
#include<unordered_map>
#pragma warning(disable: 4996)
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;


int main() {

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

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

}

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define mod 1000000007
#define MOD 998244353
#define INF 40000000000000000
int dx8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int dy8[8] = {1, 1, 1, 0, -1, -1, -1, 0};
int dx4[4] = {-1, 0, 1, 0};
int dy4[4] = {0, -1, 0, 1};
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;
}
int sum(int n){
    int res=0;
    while(n>0){
        res+=n%10;
        n/=10;
    }
    return res;
}
signed main() {
    int m,f,b;cin>>m>>f>>b;
    if(m+f<b)cout<<"NA"<<endl;
    else cout<<max((int)0,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 (m + f>= b) cout<<b - m<< endl;
else cout<<"NA"<< endl;
}

C++: #include<stdio.h>
int main(void)
{
	int m,f,b;
	int ans=0;

	scanf("%d",&m);
	scanf("%d",&f);
	scanf("%d",&b);

	if(m>=b){
		printf("0\n");
	}else{
		ans=b-m;
		if(f>=ans){
			printf("%d\n",ans);
		}else{
			printf("NA\n");
		}
	}
	return 0;
}

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

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

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

    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <stack>
#include <cmath>
#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--)
using namespace std;
//
const int inf=1e9+7;
const int mod=1e9+7;
//
struct poi{
	int X;int Y;int Z;
	bool operator<(const poi&R)const{
		return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
	}
};
//
ll GCD(ll a,ll b){
	return (b==0)?(a):(GCD(b,a%b));
}
ll LCM(ll a,ll b){
	return a/GCD(a,b)*b;
}
//
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 <iostream>
using namespace std;

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

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

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

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

C++: #include <iostream>

using namespace std;

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