#include <iostream>
#include <cstdio>
using namespace std;

int main() {
    int m, f, b;
    cin >> m >> f >> b;
    if (m+f < b) printf("NA\n");
    else if (m < b) printf("%d\n", b-m);
    else printf("0\n");
    return 0;
}
