import java.util.Scanner

object Main {
  def solve(sc: => Scanner): Unit = {
    val N = sc.nextInt
    if (N != 0) {
      val A = List.fill[Int](N)(sc.nextInt)
      println(if (!A.find(_ == 0).isEmpty) ("NA") else (A.length + 1))
      solve(sc)
    }
  }


  def main(args: Array[String]): Unit = {
    val sc: Scanner = new Scanner(System.in)

    solve(sc)
  }
}