#include <iostream>
using namespace std;

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

    return 0;
}
