n = int(input())
l = [int(li) for li in input().split(' ')]

def is_unique(a, b, c):
    return (a != b) and (a != c) and (b != c)

def is_triangle(a, b, c):
    return (a + b > c) and (b + c > a) and (c + a > b)

cnt = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            a, b, c = l[i], l[j], l[k]
            if is_unique(a, b, c) and is_triangle(a, b, c):
                cnt += 1
print(cnt) n = int(input()) n int(input()) int input() input int(li) for li in input().split(' ') for li in input().split(' ') li input().split(' ') ().split () input split ' ' for li in input().split(' ') int(li) int li l = [int(li) for li in input().split(' ')] l [int(li) for li in input().split(' ')] def is_unique(a, b, c):
    return (a != b) and (a != c) and (b != c) is_unique return (a != b) and (a != c) and (b != c) (a != b) and (a != c) and (b != c) (a != b) and (a != c) a != b a b a != c a c b != c b c a a b b c c def is_triangle(a, b, c):
    return (a + b > c) and (b + c > a) and (c + a > b) is_triangle return (a + b > c) and (b + c > a) and (c + a > b) (a + b > c) and (b + c > a) and (c + a > b) (a + b > c) and (b + 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 a a b b c c cnt = 0 cnt 0 for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            a, b, c = l[i], l[j], l[k]
            if is_unique(a, b, c) and is_triangle(a, b, c):
                cnt += 1 i range(n) range n for j in range(i + 1, n):
        for k in range(j + 1, n):
            a, b, c = l[i], l[j], l[k]
            if is_unique(a, b, c) and is_triangle(a, b, c):
                cnt += 1 j range(i + 1, n) range i + 1 i 1 n for k in range(j + 1, n):
            a, b, c = l[i], l[j], l[k]
            if is_unique(a, b, c) and is_triangle(a, b, c):
                cnt += 1 k range(j + 1, n) range j + 1 j 1 n a, b, c = l[i], l[j], l[k] a l[i] l i b l[j] l j c l[k] l k if is_unique(a, b, c) and is_triangle(a, b, c):
                cnt += 1 is_unique(a, b, c) and is_triangle(a, b, c) is_unique(a, b, c) is_unique a b c is_triangle(a, b, c) is_triangle a b c cnt += 1 cnt 1 print(cnt) print cnt cnt += 1 1 cnt def is_unique(a, b, c):
    return (a != b) and (a != c) and (b != c) def is_unique(a, b, c):
    return (a != b) and (a != c) and (b != c) is_unique def is_triangle(a, b, c):
    return (a + b > c) and (b + c > a) and (c + a > b) def is_triangle(a, b, c):
    return (a + b > c) and (b + c > a) and (c + a > b) is_triangle c = l[i], l[j], l[k] l[k] c a, b, c = l[i], l[j], l[k] l[i] a l = [int(li) for li in input().split(' ')] [int(li) for li in input().split(' ')] l cnt = 0 0 cnt n = int(input()) int(input()) n b, c = l[i], l[j], l[k] l[j] b
n = int(input())
l = [int(li) for li in input().split(' ')]

def is_unique(a, b, c):
    return (a != b) and (a != c) and (b != c)

def is_triangle(a, b, c):
    return (a + b > c) and (b + c > a) and (c + a > b)

cnt = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            a, b, c = l[i], l[j], l[k]
            if is_unique(a, b, c) and is_triangle(a, b, c):
                cnt += 1
print(cnt)
