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

