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

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