from itertools import combinations
N = int(input())
L = sorted(map(int, input().split()))
ans = 0
for a, b, c in combinations(L, 3):
    if a < b < c and a + b > c:
        ans += 1
print(ans) from itertools import combinations N = int(input()) N int(input()) int input() input L = sorted(map(int, input().split())) L sorted(map(int, input().split())) sorted map(int, input().split()) map int input().split() ().split () input split ans = 0 ans 0 for a, b, c in combinations(L, 3):
    if a < b < c and a + b > c:
        ans += 1 a b c combinations(L, 3) combinations L 3 if a < b < c and a + b > c:
        ans += 1 a < b < c and a + b > c a < b < c a < b a b c a + b > c a + b a b c ans += 1 ans 1 print(ans) print ans L = sorted(map(int, input().split())) sorted(map(int, input().split())) L ans = 0 0 ans N = int(input()) int(input()) N ans += 1 1 ans
from itertools import combinations
N = int(input())
L = sorted(map(int, input().split()))
ans = 0
for a, b, c in combinations(L, 3):
    if a < b < c and a + b > c:
        ans += 1
print(ans)
