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>
using namespace std;
int main(void){
    string str1, str2, str3;
    cin >> str1;
    cin >> str2;
    cin >> str3;
     
    int m = atoi(str1.c_str());
    int f = atoi(str2.c_str());
    int b = atoi(str3.c_str());
     
    if( m + f < b){
        cout << "NA";
    }else if(m >= b){
        cout << 0;
    }else{
        cout << b-m;
    }
     
    cout << (0?" ":"") << 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 (m < b && b <= m + f) cout << b - m << endl;
  else cout << "NA" << endl;

  return 0;
}

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

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

C++: #include<algorithm>
#include <bits/stdc++.h>
#include <math.h>
#include <queue>
using namespace std;
int main(void){
	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;
	return 0;
}

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

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 cout<<"NA"<<endl;
return 0;
}

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

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

        cin >> m >> f >> b;

        r = b - m;

        if (r > f) {
                cout << "NA" << endl;
        }
        else {
                cout << max(0, r) << endl;
        }
}

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

int m,f,b,;


int main(){
Y=0;    
cin>>m>>f>>b;

 if (m+f<b)
   cout<<NA<<endl;
 else
cout<<f=b-m<<endl;

return 0;
}

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

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <utility>
#include <functional>
#include <math.h>
#define rep(i,n) for(int i=0;i<n;++i)

using ll = long long;
using namespace std;

const ll INF = 10000000000000000;
const ll MOD = 1000000007;
ll 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>
#define MOD 1000000007
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 << c-a << 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){
    b=0;
    cout << b << endl;
  }else{
    b=b-m;
    if(f>=b){
      cout << b <<endl;
    }else{
      cout << "NA" << endl;
    }
  }
  return (0);
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];}
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<bits/stdc++.h>

#define rep(i,n) for (int i =0;i<(n);i++)
#define LL long long 

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

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

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OthloKyopro
{
    class Program
    {
        static void Main(string[] args)
        {
            /* 2 */
            var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var own = input[0];
            var a = input[1];
            var book = input[2];
            if(own > book)
            {
                Console.WriteLine(0);
            }
            else if(own + a > book)
            {
                Console.WriteLine(book - own);
            }
            else
            {
                Console.WriteLine("NA");
            }

        }
    }
}

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

int m,f,b;


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

 if (m+f<b)
   cout<<"NA"<<endl;
 else
cout<<"b-m"<<endl;

return 0;
}

C++: #include<cstdio>
using namespace std;
int main(void)
{
	int a,b,c,d;
	scanf("%d %d %d %d",&a,&b,&c,&d);
	if(a+b<c){
		printf("NA\n");
	}
	else{
		d=c-a;
		if(d<0){
			d=0;
		}
		printf("%d\n",d);
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> pip;
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;
const bool debug = 0;
//------------------------------//

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

C++: #include <iostream>
using namespace std;
int main(void){
    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 <bits/stdc++.h>

using namespace std;

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

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

C++: #include <stdio.h>

int main(void) {

	int a, b, c;

	scanf("%d %d %d", &a, &b, &c);

	if (a >= c) {
		printf("0\n");
	}
	else if ((a + b) <= c) {

		printf("NA\n");
	}
	else {
		printf("%d\n", b - a);

	}
	return 0;
}