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<stdio.h>
using namespace std;
#include<math.h>
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(void){
  int m,f,b;
  cin >> m >> f >> b;
   if(b-m > f){
    cout << "NA" << endl;
   }
   else {
    cout << max(b-m,0) << endl;
   }
 }

C++: #include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
using namespace std;
int main() {
	int n, a, b; cin >> n >> a >> b;
	if (n > b) {
		cout << '0' << endl;
	}
	else if (n + a < b) {
		cout << "NA" << endl;
	}
	else {
		cout << b - n << endl;
	}
}

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

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

C++: #include <iostream>

using namespace std;

int main() {
  int in[3];
  for(int i=0; i<3; i++) {
    cin >> in[i];
  }

  if(in[0] > in[2]) {
    cout << "0" << endl;
  } else if(in[0]+in[1]-in[2] > 0) {
    cout << in[1] - in[0] << 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 && m<b){
    	 cout << b-m << endl;
     }
     if (m+f>b && m>b){
    	 cout << "0"<< endl;
     }
     if (m+f<b){
    	 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;
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int a,b,c; cin >> a >> b >> c;
	if(a+b<c){
		cout << "NA" << endl;
		return 0;
	}
	cout << max(0,c-a) << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int m,f,b,x;
main(){
  cin>>m>>f>>b;
  if(m+f<b)cout<<"NA\n";
  else if(m<b)cout<<b-m<<endl;
  else cout<<0<<endl;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <math.h>
#include <cmath>
#include <numeric>
#include <iomanip>


#define log(x) cout<<x<<endl
#define pb push_back
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
using namespace std;


// <<fixed<<setprecision(6)<<


int gcd(lint x, lint y){
  return y==0 ? x:gcd(y,x % y);
}


int combi(int n, int r){
  int num = 1;
  for(int i = 1; i <= r; i++){
    num = num * (n - i + 1) / i;
  }
  return num;
}

int stringcount(string s, char c) {
  return count(s.cbegin(), s.cend(), c);
}

bool isPrime(int x){
  int i;
  if(x < 2)return 0;
  else if(x == 2) return 1;
  if(x%2 == 0) return 0;
  for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
  return 1;
}

int binary(vector<int> a,lint key) {
  lint left = 0;
  lint right = a.size();
  while(left<right){
    lint mid = (left+right)/2;
    if(a[mid] == key){
      return 1;
    }
    else if(key<a[mid]){
      right = mid;
    }
    else{
      left = mid+1;
    }
  }
  return 0;
}


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

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

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 <bits/stdc++.h>  // g++ -std=c++14 -o a a.cpp

using namespace std;

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

#define rep(i, n) for(int i = 0; i < (n); i++)
#define repto(i, n) for(int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
#define DEBUG(x) cout << #x << ": " << x << endl;

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

__attribute__((constructor))
void initial() {
    cin.tie(0);
    ios::sync_with_stdio(false);
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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 ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}
bool is_prime(ll n) {
  for (ll i = 2; i*i <= n; i++) {
    if (n%i == 0) return false;
  }
  return n != 1;
}
ll mod_pow(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll res = mod_pow(x*x%mod, n/2, mod);
  if (n & 1) res = res * x % mod;
  return res;
}

int main() {
    ll n, m, l;
    cin >> n >> m >> l;
    if (n >= l) {
        cout << 0 << endl;
    } else {
        if (n+m < l) {
            cout << "NA" << endl; 
        } else {
            cout << l - n << endl;
        }
    }
}

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 (b <= m) {
      cout << 0 << endl;
    } else {
      cout << b - m << endl;
    }
  }
}

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

using ll = long long;
using pii = pair<int, int>;

constexpr int INF = 1e9;
constexpr ll INFLL = 1e18;

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

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