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

import itertools
cnt = 0
for s, t, u in itertools.combinations(L, 3):
    if (s != t) and (t != u) and (u != s):
        if (s+t > u) and (t+u > s) and (s+u > t):
            cnt += 1

print(cnt) 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 import itertools itertools cnt = 0 cnt 0 for s, t, u in itertools.combinations(L, 3):
    if (s != t) and (t != u) and (u != s):
        if (s+t > u) and (t+u > s) and (s+u > t):
            cnt += 1 s t u itertools.combinations(L, 3) itertools.combinations itertools combinations L 3 if (s != t) and (t != u) and (u != s):
        if (s+t > u) and (t+u > s) and (s+u > t):
            cnt += 1 (s != t) and (t != u) and (u != s) (s != t) and (t != u) s != t s t t != u t u u != s u s if (s+t > u) and (t+u > s) and (s+u > t):
            cnt += 1 (s+t > u) and (t+u > s) and (s+u > t) (s+t > u) and (t+u > s) s+t > u s+t s t u t+u > s t+u t u s s+u > t s+u s u t cnt += 1 cnt 1 print(cnt) print cnt n = int(input()) int(input()) n cnt = 0 0 cnt L = list(map(int, input().split())) list(map(int, input().split())) L cnt += 1 1 cnt
n = int(input())
L = list(map(int, input().split()))

import itertools
cnt = 0
for s, t, u in itertools.combinations(L, 3):
    if (s != t) and (t != u) and (u != s):
        if (s+t > u) and (t+u > s) and (s+u > t):
            cnt += 1

print(cnt)