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 all(x) (x).begin(),(x).end()
#define ll long long
#define ld long double
#define vl vector<long long>
#define vvl vector<vector<long long>>
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
#define rrep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--)
#define pll pair<long long,long long>
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define vvc vector<vector<char>>
#define vc vector<char>
#define vvb vector<vector<bool>>
#define vb vector<bool>
#define elif else if
#define maxe(x) *max_element(all(x))
#define mine(x) *min_element(all(x))
#define Size(x) ((int)(x).size())
const long long INF = 1LL << 60;
const long double pi = 3.1415926535897932;
long long MOD = 1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

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

    vector<long long> divisor(long long n) {
        vector<long long> ret;
        for (long long i = 1; i * i <= n; i++) {
            if (n % i == 0) {
                ret.push_back(i);
                if (i * i != n) ret.push_back(n / i);
            }
        }
        sort(ret.begin(), ret.end()); // 昇順に並べる
        return ret;
    }

    map< ll, ll > prime_factor(ll n) {
        map< ll, ll > ret;
        for(ll i = 2; i * i <= n; i++) {
            while(n % i == 0) {
                ret[i]++;
                n /= i;
            }
        }
        if(n != 1) ret[n] = 1;
        return ret;
    }

    //(mod m)でのaの逆元を計算する
    //a/b(mod m)=a(mod m)*modinv(b,m)
    long long modinv(long long a, long long m) {
        long long b = m, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        u %= m;
        if (u < 0) u += m;
        return u;
    }

    long long modpow(long long a, long long n, long long mod) {
        long long res = 1;
        while (n > 0) {
            if (n & 1) res = res * a % mod;
            a = a * a % mod;
            n >>= 1;
        }
        return res;
    }

    ll modnCr(ll n, ll r, ll mod) {
        ll res = 1;
        rep (i, r) {
          res = res * (n - i) % mod * modpow(i + 1, mod - 2, mod) % mod;
        }
        return res;
      }

    struct UnionFind {
        vector<int> par;
    
        UnionFind(int n) : par(n, -1) { }
    
        int root(int x) {
            if (par[x] < 0) return x;
            else return par[x] = root(par[x]);
        }
    
        bool issame(int x, int y) {
            return root(x) == root(y);
        }
    
        bool merge(int x, int y) {
            x = root(x); y = root(y);
            if (x == y) return false;
            if (par[x] > par[y]) swap(x, y); // merge technique
            par[x] += par[y];
            par[y] = x;
            return true;
        }
    
        int size(int x) {
            return -par[root(x)];
        }
    };
//mint,----------------------------------------------------
    signed main(){
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        ll m,f,b;
        cin>>m>>f>>b;
        if(m>=b)cout<<0<<endl;
        elif(m+f>=b)cout<<b-m<<endl;
        else cout<<"NA"<<endl;
    }

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

int m,f,b;


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

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

return 0;
}

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

   if (  b > (m + f) ) cout << "NA" << endl;
   else
   if ( b <= m ) cout << 0 << endl;
   else cout << b-m << 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 <iostream>
using namespace std;

int main(void){
    int me, A, book, debt;
    cin >> me >> A >> book;
     
    if(me >= book){
        cout << 0 << endl;
    }
     
    else{
        debt = book - me;
        if(A >= debt){
            cout << debt << endl;
        }
        else cout << "NA" << endl;
    }
    return 0;
}

/*
　自分の所持金が本の値段より多ければ、借金は０円。
　不足しているとき、不足分がＡ君の所持金より少なければ、Ａ君から借りる。
　不足分がＡ君の所持金より多ければ、「NA」を返す。
*/

C++: 
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <sstream>
using namespace std;
int main(){
	int m,f,b,sum;
	cin>>m>>f>>b;
	sum=m+f;
	if(sum<b)cout<<"NA"<<endl;
	else if(m>=b)cout<<"0"<<endl;
	else if(sum>=b&&m<b)cout<<b-m<<endl;
	return 0;
}

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

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

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

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

  cin >> m >> f >> b;
  ans = m - b;
  if (ans >= 0) cout << "0" << endl;
  else if (ans < 0 && f + ans >= 0) cout << ans * -1 << endl;
  else cout << "NA" << endl;
}