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

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

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

int main(){

  int m, f, b;

  cin>>m>>f>>b;

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

  return 0;
}

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" << 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 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 <cstdlib>

using namespace std;

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

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

C++: #include <iostream>
#include <string.h>
#include <stdio.h>
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<<f-m<<endl;
    }
}

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



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

  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 
using namespace std;
  
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 <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++: #include<bits/stdc++.h>
using namespace std;
int main(void)
{
	int a,b,c;
	cin>>a>>b>>c;
	if(c<=a) cout<<0<<endl;
	else if(c<=a+b) cout<<c-a<<endl;
	else cout<<"NA"<<endl;
	
	return 0;
}

C++: #include <iostream>

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

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int m,f,b;
	scanf("%d %d %d",&m,&f,&b);
	if(m>=b){
		printf("%d\n",0);
	}
	else if(m+f<b){
		printf("NA\n");
	}
	else if(m+f>=b){
		printf("%d\n",b-m);
	}
	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(f>=b){
		printf("%d\n",b-m);
	}
	else if(m+f>=b){
		printf("%d\n",b-m);
	}
	else printf("NA\n");
	return 0;
}

C++: #include <iostream>

int main()
{
    int m, f, b;
    std::cin >> m >> f >> b;
    if (m + f < b) {
        std::cout << "NA" << std::endl;
    } else {
        std::cout << std::max(0, b - m) << std::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 <stdio.h>
int main(void){
	int m,f,b;
	scanf("%d %d %d",&m,&f,&b);
	if(b<m){
		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 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>
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 <cstdio>
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
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++: //============================================================================
// Name        : tokuteigai.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

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

C++: #include <bits/stdc++.h>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
const int INF = 2147483647;//int max
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int,int>;
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; }
//ミョ(-ω- ?)
int main() {
    ll m,f,b;
    cin >> m >> f >> b;
    if(m+f < b)cout << "NA\n";
    else if(m > b){
        cout << 0 << endl;
    }else{
        cout << b-m << endl;
    }
    return 0;
}