#include <bits/stdc++.h>
int main() {
  int *A, i, N, n, count = 0;
  scanf("%d\n", &N);
  A = (int *)malloc(N * sizeof(int));
  for (i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  for (i = 0; i < N; i++) {
    for (n = 1; n < A[i]; n++) {
      if (n == 1)
        continue;
      else if (n == A[i] - 1 && A[i] % n != 0)
        count++;
    }
  }
  printf("%d\n", count + 1);
  return 0;
}
