#include <bits/stdc++.h>
int main(void) {
  int q1, b, c1, c2, q2;
  int c1_n, c2_n;
  while (scanf("%d %d %d %d %d", &q1, &b, &c1, &c2, &q2)) {
    if (q1 == 0) {
      break;
    }
    c1_n = c2_n = 0;
    while (b - c1 >= 0 && c1_n <= q2 && ((b - c1) / c2_n + c1_n) >= q2) {
      b -= c1;
      c1_n++;
    }
    while (b - c2 >= 0) {
      b -= c2;
      c2_n++;
    }
    if (c1_n + c2_n >= q1) {
      printf("%d\n", c1_n + c2_n);
    } else {
      printf("NA\n");
    }
  }
  return (0);
}
