a = int(input())
p = list(map(int,input().split()))
count = 0

for i in range(a):
     for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1
print(count) a = int(input()) a int(input()) int input() input p = list(map(int,input().split())) p list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split count = 0 count 0 for i in range(a):
     for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1 i range(a) range a for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1 s range(a) range a for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1 t range(a) range a if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1 p[t]<p[s]<p[i] and p[t]+p[s]>p[i] p[t]<p[s]<p[i] p[t]<p[s] p[t] p t p[s] p s p[i] p i p[t]+p[s]>p[i] p[t]+p[s] p[t] p t p[s] p s p[i] p i count+=1 count 1 print(count) print count count+=1 1 count p = list(map(int,input().split())) list(map(int,input().split())) p count = 0 0 count a = int(input()) int(input()) a
a = int(input())
p = list(map(int,input().split()))
count = 0

for i in range(a):
     for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1
print(count)