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

Python: m, f, b = map(int, input().split())
print("NA") if m < b - f else print(max(0, b - m))

Python: m, f, b = map(int, input().split())
if(m + f < b) :
  print("NA")
elif(m >= b) :
  print(0)
else :
  print(b - m)

Python: a,b,c = map(int, input().split())
if a >= c:
  print(0)
else:
  d = c - a
  if d <= b:
    print(d)
  else:
    print("NA")

Python: m, f, b = map(int, input().split())
if m >= b:
  print("0")
elif m < b and m + f >= b:
  print(b-m)
else:
  print("NA")

Python: a,b,c=map(int,input().split())
if c <= a:
 print("0")
elif c <= a+b:
 print(c-a)
else:
 print("NA")

Python: m, f, b = map(int, input().split())
if(m >= b):
    print(0)
else:
    if(b-m <= f):
        print(b - m)
    else:
        print("NA")

Python: m, f, b = map(int, input().split())
if b - m > 0:
  if f >= b - m:
    print(b - m)
  else:
    print("NA")
else:
  print("0")

Python: m, f, b = map(int, input().split())
print("NA" if m+f < b else max(0, b-m))

Python: m,f, b = map(int, input().split())
if b - m > 0:
  if f >= (b - m):
    print(b - m)
  else:
    print("NA")
else:
  print("0")

Python: m, f, b = map(int, input().split())
if m >= b:
  print("0")
elif m < b and m + f >= b:
  print(b-m)
else:
  print("NA")

Python: m,f,b=map(int,input().split())
ans=0
if m>b:
    ans=0
elif m<b:
    ans=b-m
elif ans>f:
    ans="NA"
print(ans)

Python: m,f,b=map(int,input().split())
ans=0
if m>b:
    ans=0
elif m<b:
    ans=b-m
elif m+f<b:
    ans="NA"
print(ans)

Python: m,f,b =map(int, input().split())
if m+f<b:
  print("NA")
elif m>=b:
  print("0")
else:
  print(b-m)

Python: # -*- coding: utf-8 -*-
A=list(map(int, input().split()))

if A[0]+A[1]<A[2]:
    print("NA")
elif A[0]>A[2]:
    print(0)
else:
    print(A[2]-A[0])

Python: m,f,b = list(map(int, input().split()))

t = b - m
if t>0:
    if t<=f: print(t)
    else: print("NA")
else: print(0)

Python: m, f, b = map(int, input().split())
if m >= b:
    print(0)
elif b > m+f:
    print("NA")
else:
    print(b-m)

Python: m, f, b = map(int, input().split())

if b <= m:
    print(0)

elif b <= m + f:
    print(b - m)
else:
    print("NA")

Python: m,f,b=map(int,input().split())
if m-b>0:
  print(0)
elif m+f>=b:
  print(b-m)
elif m+f<b:
  print('NA')

Python: m,f,b=map(int,input().split())
ans=0
if m+f<b:
    ans= "NA"
elif m>b:
    ans=0
elif m<b:
    ans=b-m

print(ans)

Python: a,b,c=map(int,input().split())
if c <= a:
 print("0")
elif c <= a+b:
 print(c-a)
else:
 print("NA")

Python: ms = [i for i in map(int,input().split())]
if ms[0] >= ms[2]:
    print(0)
elif ms[0]+ms[1] >= ms[2]:
    print(ms[2]-ms[0])
else:
    print("NA")

Python: #標準入力
a,b,c = map(int,input().split())

#自分の持っていたお金で足りるなら0を出力する
if a >= c:print("0")

#自分とAのお金を足しても足りないならNAを出力する
elif a + b < c:print("NA")

#上記の2つ以外ならAにいくら借りるかを計算する
else:print(c - a)

Python: m,a,b=map(int,input().split())
if m>=b:
  print(0)
elif m+a<b:
  print("NA")
else:
  print(b-m)

Python: m,f,b=map(int,input().split())
ans=0
if m>b:
    ans=0
elif m<b:
    ans=b-m
elif ans>f:
    ans="NA"
print(ans)

Python: m,f,b=map(int,input().split())
if b<=m:
    print(0)
elif b<=m+f:
    print(b-m)
else:
    print('NA')

Python: m,f,b=map(int,input().split())
if m>=b:
  print(0)
elif (m+f)>=b:
  print(b-m)
else:
  print("NA")

Python: m, f, b = map(int, input().split())
if m  + f < b:
    print("NA")
elif  m >= b:
    print(0)
else:
    print(b - m)

Python: a, b, c = map(int, input().split())
if a >= c:
  print(0)
else:
  d = c - a
  if b >= d:
    print(d)
  else:
    print("NA")

Python: m, f, b = map(int, input().split())
print(max(0, b - m) if b - m <= f else "NA")

Python: a,b,c=map(int,input().split())
if c <= a:
  print("0")
elif c <= a+b:
  print(c-a)
else:
  print("NA")

Python: m,f,b=map(int,input().split())

x=b-m
if b<=m:
    print(0)
elif f>=x and 0<=x:
    print(x)
else:
    print("NA")

Python: m, f, b = map(int, input().split())

if m >= b :
    print(0)
elif m+f >= b :
    print(b-m)
else :
    print('NA')

Python: a,b,c=map(int,input().split())
if c <= a:
 print("0")
elif c <= a+b:
 print(c-a)
else:
 print("NA")

Python: m, f, b = map(int, input().split())
if m >= b:
    print(0)
elif m + f < b:
    print('NA')
else:
    print(b - m)

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

using namespace std;

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

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

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


  return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
/*int p = 998244353;*/
int p = 1000000007;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define mmax(a,b) a=max(a,b)
#define mmin(a,b) a=min(a,b)
#define mkp make_pair
#define pin pair<int,int>
#define qin pair<int,pin>
#define V vector
#define Endl endl
#define veb vector<bool>
#define rev(s) reverse(s.begin(),s.end())
#define end_pr(s) cout << s <<endl;return 0
signed main(){
	int m, f,b; cin >> m >> f>>b;
	if (m + f < b) { cout << "NA" << endl; }
	else {
		int ze = 0;
		cout << max(ze, b - m) << endl;
	}
}

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 <stdio.h>

int main(void) {

	int a, b, c;

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

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

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

	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <map>
#include <string>

using namespace std;


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

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c;
    cin>>a>>b>>c;
    if(a-c>=0){cout<<0<<endl;goto a;}
    else {c=c-a;}
    if(b-c>=0){cout<<c<<endl;}
    else {cout<<"NA"<<endl;}
a:  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;    
    }
    }
    return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    if(a+b < c) puts("NA");
    else cout << max(c-a, 0) << "\n";
    return 0;
}