n = int(input())
ls = sorted(list(map(int, input().split())))
cnt = 0
for i in range(len(ls) - 2):
    a = ls[i]
    for j in range(i+1, len(ls) - 1):
        b = ls[j]
        for k in range(j+1, len(ls)):
            c = ls[k]
            if a==b or a==c or b==c:
                continue
            if a+b > c and b+c > a and c+a > b:
                cnt += 1
print(cnt) n = int(input()) n int(input()) int input() input ls = sorted(list(map(int, input().split()))) ls sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split cnt = 0 cnt 0 for i in range(len(ls) - 2):
    a = ls[i]
    for j in range(i+1, len(ls) - 1):
        b = ls[j]
        for k in range(j+1, len(ls)):
            c = ls[k]
            if a==b or a==c or b==c:
                continue
            if a+b > c and b+c > a and c+a > b:
                cnt += 1 i range(len(ls) - 2) range len(ls) - 2 len(ls) len ls 2 a = ls[i] a ls[i] ls i for j in range(i+1, len(ls) - 1):
        b = ls[j]
        for k in range(j+1, len(ls)):
            c = ls[k]
            if a==b or a==c or b==c:
                continue
            if a+b > c and b+c > a and c+a > b:
                cnt += 1 j range(i+1, len(ls) - 1) range i+1 i 1 len(ls) - 1 len(ls) len ls 1 b = ls[j] b ls[j] ls j for k in range(j+1, len(ls)):
            c = ls[k]
            if a==b or a==c or b==c:
                continue
            if a+b > c and b+c > a and c+a > b:
                cnt += 1 k range(j+1, len(ls)) range j+1 j 1 len(ls) len ls c = ls[k] c ls[k] ls k if a==b or a==c or b==c:
                continue
             a==b or a==c or b==c a==b or a==c a==b a b a==c a c b==c b c continue if a+b > c and b+c > a and c+a > b:
                cnt += 1 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 cnt += 1 cnt 1 print(cnt) print cnt a = ls[i] ls[i] a b = ls[j] ls[j] b cnt += 1 1 cnt c = ls[k] ls[k] c n = int(input()) int(input()) n cnt = 0 0 cnt ls = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) ls
n = int(input())
ls = sorted(list(map(int, input().split())))
cnt = 0
for i in range(len(ls) - 2):
    a = ls[i]
    for j in range(i+1, len(ls) - 1):
        b = ls[j]
        for k in range(j+1, len(ls)):
            c = ls[k]
            if a==b or a==c or b==c:
                continue
            if a+b > c and b+c > a and c+a > b:
                cnt += 1
print(cnt)