from itertools import combinations

n = int(input())
L = list(map(int, input().split()))

cnt = 0
for edges in list(combinations(L, 3)):
  if len(set(edges)) != 3:
    continue
  
  e1 = edges[0] < edges[1] + edges[2]
  e2 = edges[1] < edges[0] + edges[2]
  e3 = edges[2] < edges[0] + edges[1]
  
  if e1 and e2  and e3:
    cnt += 1

print(cnt) from itertools import combinations 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 cnt = 0 cnt 0 for edges in list(combinations(L, 3)):
  if len(set(edges)) != 3:
    continue
  
  e1 = edges[0] < edges[1] + edges[2]
  e2 = edges[1] < edges[0] + edges[2]
  e3 = edges[2] < edges[0] + edges[1]
  
  if e1 and e2  and e3:
    cnt += 1 edges list(combinations(L, 3)) list combinations(L, 3) combinations L 3 if len(set(edges)) != 3:
    continue
  
   len(set(edges)) != 3 len(set(edges)) len set(edges) set edges 3 continue e1 = edges[0] < edges[1] + edges[2] e1 edges[0] < edges[1] + edges[2] edges[0] edges 0 edges[1] + edges[2] edges[1] edges 1 edges[2] edges 2 e2 = edges[1] < edges[0] + edges[2] e2 edges[1] < edges[0] + edges[2] edges[1] edges 1 edges[0] + edges[2] edges[0] edges 0 edges[2] edges 2 e3 = edges[2] < edges[0] + edges[1] e3 edges[2] < edges[0] + edges[1] edges[2] edges 2 edges[0] + edges[1] edges[0] edges 0 edges[1] edges 1 if e1 and e2  and e3:
    cnt += 1 e1 and e2  and e3 e1 and e2 e1 e2 e3 cnt += 1 cnt 1 print(cnt) print cnt L = list(map(int, input().split())) list(map(int, input().split())) L cnt = 0 0 cnt e1 = edges[0] < edges[1] + edges[2] edges[0] < edges[1] + edges[2] e1 cnt += 1 1 cnt n = int(input()) int(input()) n e3 = edges[2] < edges[0] + edges[1] edges[2] < edges[0] + edges[1] e3 e2 = edges[1] < edges[0] + edges[2] edges[1] < edges[0] + edges[2] e2
from itertools import combinations

n = int(input())
L = list(map(int, input().split()))

cnt = 0
for edges in list(combinations(L, 3)):
  if len(set(edges)) != 3:
    continue
  
  e1 = edges[0] < edges[1] + edges[2]
  e2 = edges[1] < edges[0] + edges[2]
  e3 = edges[2] < edges[0] + edges[1]
  
  if e1 and e2  and e3:
    cnt += 1

print(cnt)
