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

