n = int(input())
L = sorted(list(map(int,input().split())),reverse = True)
ans = 0
for i in L:
    for j in L:
        for k in L:
            if i<j<k:
                if i + j>k:
                    ans += 1
print(ans) n = int(input()) n int(input()) int input() input L = sorted(list(map(int,input().split())),reverse = True) L sorted(list(map(int,input().split())),reverse = True) sorted list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split reverse = True reverse True ans = 0 ans 0 for i in L:
    for j in L:
        for k in L:
            if i<j<k:
                if i + j>k:
                    ans += 1 i L for j in L:
        for k in L:
            if i<j<k:
                if i + j>k:
                    ans += 1 j L for k in L:
            if i<j<k:
                if i + j>k:
                    ans += 1 k L if i<j<k:
                if i + j>k:
                    ans += 1 i<j<k i<j i j k if i + j>k:
                    ans += 1 i + j>k i + j i j k ans += 1 ans 1 print(ans) print ans n = int(input()) int(input()) n ans = 0 0 ans L = sorted(list(map(int,input().split())),reverse = True) sorted(list(map(int,input().split())),reverse = True) L ans += 1 1 ans
n = int(input())
L = sorted(list(map(int,input().split())),reverse = True)
ans = 0
for i in L:
    for j in L:
        for k in L:
            if i<j<k:
                if i + j>k:
                    ans += 1
print(ans)