#include <bits/stdc++.h>
using namespace std;
int check(double a, double b){
double x = a*b;
double d = floor(x);
if(x/d==1){
return 1;
}
return 0;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
double a[n];
int count = 0;
set<double> s;
for(int i=0; i<n; i++){
cin >> a[i];
s.insert(a[i]);
}
for(int i=0; i<n; i++){
if(i==n-1)
break;
for(int j=i+1; j<n; j++){
if(check(a[i],a[j])==1){
count++;
}
}
}
int size = (int)s.size();
if(size!=n){
count = count - (n-size);
}
cout << count << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGNoZWNrKGRvdWJsZSBhLCBkb3VibGUgYil7CiAgZG91YmxlIHggPSBhKmI7CiAgZG91YmxlIGQgPSBmbG9vcih4KTsKICBpZih4L2Q9PTEpewogICAgcmV0dXJuIDE7CiAgfQogIHJldHVybiAwOwp9CgppbnQgbWFpbigpewoJaW9zOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwoJY2luLnRpZSgwKTsKCWludCBuOwoJY2luID4+IG47Cglkb3VibGUgYVtuXTsKCWludCBjb3VudCA9IDA7CglzZXQ8ZG91YmxlPiBzOwoJZm9yKGludCBpPTA7IGk8bjsgaSsrKXsKCQljaW4gPj4gYVtpXTsKCQlzLmluc2VydChhW2ldKTsKCX0KCglmb3IoaW50IGk9MDsgaTxuOyBpKyspewoJCWlmKGk9PW4tMSkKCQkJYnJlYWs7CgkJZm9yKGludCBqPWkrMTsgajxuOyBqKyspewoJCQlpZihjaGVjayhhW2ldLGFbal0pPT0xKXsKCQkJCWNvdW50Kys7CgkJCX0KCQl9Cgl9CglpbnQgc2l6ZSA9IChpbnQpcy5zaXplKCk7CglpZihzaXplIT1uKXsKCQljb3VudCA9IGNvdW50IC0gKG4tc2l6ZSk7Cgl9Cgljb3V0IDw8IGNvdW50IDw8ICJcbiI7CglyZXR1cm4gMDsKfQo=