data = []
count = 0
n=int(input())

for i in range(n):
    data.append(float(input()))
#print(data)
for i in range(n-1):
     for j in range(i+1,n):
            if(data[i] * data[j] == int(data[i] * data[j])):
                 count += 1
print(count)


