from itertools import combinations as comb
N = int(input())
L = list(map(int,input().split()))
count = 0
for a, b, c in comb(L, 3):
  if a != b and b != c and c != a and a + b > c and b + c > a and c + a > b:
    count += 1
print(count) from itertools import combinations as comb 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 count = 0 count 0 for a, b, c in comb(L, 3):
  if a != b and b != c and c != a and a + b > c and b + c > a and c + a > b:
    count += 1 a b c comb(L, 3) comb L 3 if a != b and b != c and c != a and a + b > c and b + c > a and c + a > b:
    count += 1 a != b and b != c and c != a and a + b > c and b + c > a and c + a > b a != b and b != c and c != a and a + b > c and b + c > a a != b and b != c and c != a and a + b > c a != b and b != c and c != a a != b and b != c a != b a b b != c b c c != a c a a + b > c a + b a b c b + c > a b + c b c a c + a > b c + a c a b count += 1 count 1 print(count) print count count = 0 0 count N = int(input()) int(input()) N count += 1 1 count L = list(map(int,input().split())) list(map(int,input().split())) L
from itertools import combinations as comb
N = int(input())
L = list(map(int,input().split()))
count = 0
for a, b, c in comb(L, 3):
  if a != b and b != c and c != a and a + b > c and b + c > a and c + a > b:
    count += 1
print(count)