n = int(input())
arr = list(map(int, input().split()))
res = 0
for ii, i in enumerate(arr):
    for jj, j in enumerate(arr):
        for kk, k in enumerate(arr):
            if ii < jj < kk and i != j and j != k and k != i:
                if i + j > k and j + k > i and k + i > j:
                    res += 1
print(res)                     n = int(input()) n int(input()) int input() input arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split res = 0 res 0 for ii, i in enumerate(arr):
    for jj, j in enumerate(arr):
        for kk, k in enumerate(arr):
            if ii < jj < kk and i != j and j != k and k != i:
                if i + j > k and j + k > i and k + i > j:
                    res += 1 ii i enumerate(arr) enumerate arr for jj, j in enumerate(arr):
        for kk, k in enumerate(arr):
            if ii < jj < kk and i != j and j != k and k != i:
                if i + j > k and j + k > i and k + i > j:
                    res += 1 jj j enumerate(arr) enumerate arr for kk, k in enumerate(arr):
            if ii < jj < kk and i != j and j != k and k != i:
                if i + j > k and j + k > i and k + i > j:
                    res += 1 kk k enumerate(arr) enumerate arr if ii < jj < kk and i != j and j != k and k != i:
                if i + j > k and j + k > i and k + i > j:
                    res += 1 ii < jj < kk and i != j and j != k and k != i ii < jj < kk and i != j and j != k ii < jj < kk and i != j ii < jj < kk ii < jj ii jj kk i != j i j j != k j k k != i k i if i + j > k and j + k > i and k + i > j:
                    res += 1 i + j > k and j + k > i and k + i > j i + j > k and j + k > i i + j > k i + j i j k j + k > i j + k j k i k + i > j k + i k i j res += 1 res 1 print(res) print res arr = list(map(int, input().split())) list(map(int, input().split())) arr res += 1 1 res n = int(input()) int(input()) n res = 0 0 res
n = int(input())
arr = list(map(int, input().split()))
res = 0
for ii, i in enumerate(arr):
    for jj, j in enumerate(arr):
        for kk, k in enumerate(arr):
            if ii < jj < kk and i != j and j != k and k != i:
                if i + j > k and j + k > i and k + i > j:
                    res += 1
print(res)                    