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

C++: #include<iostream>
using namespace std;
int main(){
	int a,f, b;
	cin >> a >>f>> b;
	if (a + f < b){
		cout << "NA" << endl;
	}
	else if(a==b|a>b){
		cout <<"0" << endl;
	}
	else{
		cout << b - a << 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>=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, ans;
	scanf("%d%d%d", &m, &f, &b);
	if(m >= b){
		ans = 0;
	}else if(m+f >= b){
		ans = b-m;
	}else ans = -1;
	if(ans == -1)printf("NA\n");
	else printf("%d\n", ans);
	return 0;
}

C++: #include 
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 <iostream>

using namespace std;

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

C++: #include <iostream>
using namespace std;
int main(void){
    
    
    //あなたの手持ちの金額 「 m 」、Ａ君の手持ちの金額 「 f 」、本の値段 「 b 」と置く
    int m, f, b;
    
    //入力：Ａ君がもらった金額 「 a 」、Ｂ君がもらった金額 「 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 <bits/stdc++.h>
using namespace std;
int main(){
  long long a,b,c;
  cin >> a >> b >> c;
  if(a+b>=c){
    cout << max(c-a,0LL) << 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=b|a>b){
		cout <<"0" << endl;
	}
	else{
		cout << b - a << endl;
	}
	return 0;

}

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

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

C++: #include<iostream>

using namespace std;
int main(){
	
    int i, a, price;
    while( cin >> i >> a >> price ){
	
		if( i + a < price)
        cout << "NA\n";
        
        if( i + a >= price) {
        	
        	if( i >= price)
        	cout << "0\n";
        	
        	else
        	cout << price - i << "\n";
        	
		}

 }
    return 0;
}

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

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

C++: #include <cstdio>

using namespace std;

int main()
{
    int m,f,b;
    scanf( "%d %d %d\n", &m, &f, &b );
    int ret = b - m;
    if( ret < 0 )
    {
        printf("%d\n", 0 );
    }
    else if( f < ret )
    {
        printf("NA\n");
    }
    else
    {
        printf( "%d\n", ret );
    }
    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 <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-a, 0) << endl;
}

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

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

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int m, f, b;
    cin >> m >> f >> b;
    if(m + f < b) cout << "NA" << endl;
    else cout << max(0LL, b - m) << endl;
}

C++: #include<iostream>
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;
    }
    

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int m,f,b;
  cin>>m>>f>>b;
  if(m+f<b) cout<<"NA"<<endl;
  else cout<<max(0LL,b-m)<<endl;
  return 0;
}

C++: //https://onlinejudge.u-aizu.ac.jp/challenges/sources/PCK/Prelim/0358?year=2017

#include <bits/stdc++.h>

using namespace std;

int main() {
    int x, y, price;
    cin >> x >> y >> price;

    if (x + y < price) {
        cout << "NA" << endl;
    } else if (x >= price) {
        cout << 0 << endl;
    } else {
        cout << price - x << endl;
    }
    return 0;
}

/*
 *
 */

C++: #include <cstdio>

using namespace std;

int main()
{
    int m,f,b;
    scanf( "%d %d %d\n", &m, &f, &b );
    int ret = b - m;
    if( ret < 0 )
    {
        printf("%d\n", 0 );
    }
    else if( f < ret )
    {
        printf("NA\n");
    }
    else
    {
        printf() "%d\n", ret );
    }
    return 0;
}

C++: #include <iostream>
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;
}