n = int(input())
l = list(map(int, input().split()))
ans=0
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      li = [l[i], l[j], l[k]]
      
      m = max(li)
      if 2*m < sum(li) and len(set(li)) == 3:
        ans += 1
print(ans) n = int(input()) n int(input()) int input() input l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans=0 ans 0 for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      li = [l[i], l[j], l[k]]
      
      m = max(li)
      if 2*m < sum(li) and len(set(li)) == 3:
        ans += 1 i range(n) range n for j in range(i+1,n):
    for k in range(j+1,n):
      li = [l[i], l[j], l[k]]
      
      m = max(li)
      if 2*m < sum(li) and len(set(li)) == 3:
        ans += 1 j range(i+1,n) range i+1 i 1 n for k in range(j+1,n):
      li = [l[i], l[j], l[k]]
      
      m = max(li)
      if 2*m < sum(li) and len(set(li)) == 3:
        ans += 1 k range(j+1,n) range j+1 j 1 n li = [l[i], l[j], l[k]] li [l[i], l[j], l[k]] l[i] l i l[j] l j l[k] l k m = max(li) m max(li) max li if 2*m < sum(li) and len(set(li)) == 3:
        ans += 1 2*m < sum(li) and len(set(li)) == 3 2*m < sum(li) 2*m 2 m sum(li) sum li len(set(li)) == 3 len(set(li)) len set(li) set li 3 ans += 1 ans 1 print(ans) print ans n = int(input()) int(input()) n li = [l[i], l[j], l[k]] [l[i], l[j], l[k]] li ans += 1 1 ans m = max(li) max(li) m ans=0 0 ans l = list(map(int, input().split())) list(map(int, input().split())) l
n = int(input())
l = list(map(int, input().split()))
ans=0
for i in range(n):
  for j in range(i+1,n):
    for k in range(j+1,n):
      li = [l[i], l[j], l[k]]
      
      m = max(li)
      if 2*m < sum(li) and len(set(li)) == 3:
        ans += 1
print(ans)