m, f, b = list(map(int, input().split()))

print(("NA" if m+f < b else max(0, b-m)))
m, f, b = list(map(int, input().split()))

print(("NA"*(m+f < b) + (m+f >= b)*str(max(0, b-m))))
m, f, b = list(map(int, input().split()))
print(("NA" if m + f < b else max(0, b - m)))

m, f, b = list(map(int, input().split()))
print(("NA" * (m + f < b) + (m + f >= b) * str(max(0, b - m))))

-print(("NA" if m + f < b else max(0, b - m))) +print(("NA" * (m + f < b) + (m + f >= b) * str(max(0, b - m))))