petern = 0
n = input()
Ln = input()
L = list(map(int, Ln.split(' ')))
for i in range(0, len(L)) :
    moji1 = L[i]
    for j in range(i+1, len(L)):
        moji2 = L[j]
        for k in range(j+1, len(L)):
            moji3 = L[k]
            if moji1 != moji2 and moji2 != moji3 and moji3 != moji1 :
                if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1
print(petern) petern = 0 petern 0 n = input() n input() input Ln = input() Ln input() input L = list(map(int, Ln.split(' '))) L list(map(int, Ln.split(' '))) list map(int, Ln.split(' ')) map int Ln.split(' ') Ln.split Ln split ' ' for i in range(0, len(L)) :
    moji1 = L[i]
    for j in range(i+1, len(L)):
        moji2 = L[j]
        for k in range(j+1, len(L)):
            moji3 = L[k]
            if moji1 != moji2 and moji2 != moji3 and moji3 != moji1 :
                if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1 i range(0, len(L)) range 0 len(L) len L moji1 = L[i] moji1 L[i] L i for j in range(i+1, len(L)):
        moji2 = L[j]
        for k in range(j+1, len(L)):
            moji3 = L[k]
            if moji1 != moji2 and moji2 != moji3 and moji3 != moji1 :
                if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1 j range(i+1, len(L)) range i+1 i 1 len(L) len L moji2 = L[j] moji2 L[j] L j for k in range(j+1, len(L)):
            moji3 = L[k]
            if moji1 != moji2 and moji2 != moji3 and moji3 != moji1 :
                if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1 k range(j+1, len(L)) range j+1 j 1 len(L) len L moji3 = L[k] moji3 L[k] L k if moji1 != moji2 and moji2 != moji3 and moji3 != moji1 :
                if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1 moji1 != moji2 and moji2 != moji3 and moji3 != moji1 moji1 != moji2 and moji2 != moji3 moji1 != moji2 moji1 moji2 moji2 != moji3 moji2 moji3 moji3 != moji1 moji3 moji1 if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1 moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 moji1+moji2 > moji3 and moji2+moji3 > moji1 moji1+moji2 > moji3 moji1+moji2 moji1 moji2 moji3 moji2+moji3 > moji1 moji2+moji3 moji2 moji3 moji1 moji3+moji1 > moji2 moji3+moji1 moji3 moji1 moji2 petern += 1 petern 1 print(petern) print petern moji2 = L[j] L[j] moji2 Ln = input() input() Ln n = input() input() n L = list(map(int, Ln.split(' '))) list(map(int, Ln.split(' '))) L petern += 1 1 petern moji1 = L[i] L[i] moji1 petern = 0 0 petern moji3 = L[k] L[k] moji3
petern = 0
n = input()
Ln = input()
L = list(map(int, Ln.split(' ')))
for i in range(0, len(L)) :
    moji1 = L[i]
    for j in range(i+1, len(L)):
        moji2 = L[j]
        for k in range(j+1, len(L)):
            moji3 = L[k]
            if moji1 != moji2 and moji2 != moji3 and moji3 != moji1 :
                if moji1+moji2 > moji3 and moji2+moji3 > moji1 and moji3+moji1 > moji2 :
                    petern += 1
print(petern)
