#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cin.ignore();
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    v.push_back(t);
  }
  vector<bool> vp;
  int m = sqrt(*max_element(v.begin(), v.end()));
  vp.resize(m);
  fill(vp.begin(), vp.end(), true);
  vp[0] = false;
  vp[1] = false;
  for (int i = 2; i * i < m; i++) {
    if (vp[i] == true) {
      for (int j = i * i; j < m; j += i) {
        vp[j] = false;
      }
    }
  }
  vector<int> vpp;
  for (int i = 2; i < vp.size(); i++) {
    if (vp[i] == true) {
      vpp.push_back(i);
    }
  }
  int count = 0;
  for (int i = 0; i < v.size(); i++) {
    for (int j = 0; j < vpp.size(); j++) {
      if (v[i] % vpp[j] == 0) {
        count++;
      }
    }
  }
  cout << count << endl;
  return 0;
}
