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<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<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 <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

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

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

return 0;
}

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

  if(b<=m+f)

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

  else
   cout<<"NA"<<endl;

  return 0;
}

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

    cin >> m;
    cin >> f;
    cin >> b;

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


    return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>

using namespace std;

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

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

int main() {
	int m, f, b;
	cin >> m >> f >> b;
	if (m + f < b) cout << "NA";
	else cout << max(b - m, 0);
	cout << 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<<(m-b)<<endl;

return 0;
}

C++: #include<iostream>
#include<vector>
#include<cmath>
#define _GLIBCXX_DEBUG
using namespace std;

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

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

int main() {
	int a, b,c;
	scanf("%d %d %d", &a, &b,&c);
	if (b >= c) printf("0\n");
	else if(a+b>=c) printf("%d\n", c-b);
	else printf("NA");
	return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#define V vector
#define VI vector<int>
#define VVI vector<vector<int>>
#define rep(i,N) for(int i=0;i<N;i++)

using namespace std;

int main(void){
    int M,F,B;
    cin>>M>>F>>B;
    if(M+F<B){
        cout<<"NA"<<endl;
        return 0;
    }
    cout<<max(0,B-M)<<endl;

}

C++: 
int main(){
    
}

C++: #include <stdio.h>

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