N = int(input())
L = sorted(list(map(int, input().split())))
ans = 0
for i in L:
    for j in L:
        for k in L:
            if i < j < k:
                if i + j + k > max(i,j,k) * 2:
                    ans += 1
else:
    print(ans) N = int(input()) N int(input()) int input() input L = sorted(list(map(int, input().split()))) L sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans = 0 ans 0 for i in L:
    for j in L:
        for k in L:
            if i < j < k:
                if i + j + k > max(i,j,k) * 2:
                    ans += 1
else:
    print(ans) i L for j in L:
        for k in L:
            if i < j < k:
                if i + j + k > max(i,j,k) * 2:
                    ans += 1 j L for k in L:
            if i < j < k:
                if i + j + k > max(i,j,k) * 2:
                    ans += 1 k L if i < j < k:
                if i + j + k > max(i,j,k) * 2:
                    ans += 1 i < j < k i < j i j k if i + j + k > max(i,j,k) * 2:
                    ans += 1 i + j + k > max(i,j,k) * 2 i + j + k i + j i j k max(i,j,k) * 2 max(i,j,k) max i j k 2 ans += 1 ans 1 print(ans) print ans L = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) L N = int(input()) int(input()) N ans = 0 0 ans ans += 1 1 ans
N = int(input())
L = sorted(list(map(int, input().split())))
ans = 0
for i in L:
    for j in L:
        for k in L:
            if i < j < k:
                if i + j + k > max(i,j,k) * 2:
                    ans += 1
else:
    print(ans)