import itertools

N = int(input())
L = list(map(int, input().split()))

combinations = list(itertools.combinations(range(N), 3))

count = 0
for cmb in combinations:
    flag = True
    for i in range(3):
        if L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] and L[cmb[i]] != L[cmb[(i + 1) % 3]]:
            continue
        else:
            flag = False
            break
    if flag:
        count += 1

print(count) import itertools itertools N = int(input()) N int(input()) int input() input L = list(map(int, input().split())) L list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split combinations = list(itertools.combinations(range(N), 3)) combinations list(itertools.combinations(range(N), 3)) list itertools.combinations(range(N), 3) itertools.combinations itertools combinations range(N) range N 3 count = 0 count 0 for cmb in combinations:
    flag = True
    for i in range(3):
        if L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] and L[cmb[i]] != L[cmb[(i + 1) % 3]]:
            continue
        else:
            flag = False
            break
    if flag:
        count += 1 cmb combinations flag = True flag True for i in range(3):
        if L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] and L[cmb[i]] != L[cmb[(i + 1) % 3]]:
            continue
        else:
            flag = False
            break
     i range(3) range 3 if L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] and L[cmb[i]] != L[cmb[(i + 1) % 3]]:
            continue
        else:
            flag = False
            break
     L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] and L[cmb[i]] != L[cmb[(i + 1) % 3]] L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] L[cmb[i]] + L[cmb[(i + 1) % 3]] L[cmb[i]] L cmb[i] cmb i L[cmb[(i + 1) % 3]] L cmb[(i + 1) % 3] cmb (i + 1) % 3 i + 1 i 1 3 L[cmb[(i + 2) % 3]] L cmb[(i + 2) % 3] cmb (i + 2) % 3 i + 2 i 2 3 L[cmb[i]] != L[cmb[(i + 1) % 3]] L[cmb[i]] L cmb[i] cmb i L[cmb[(i + 1) % 3]] L cmb[(i + 1) % 3] cmb (i + 1) % 3 i + 1 i 1 3 continue flag = False flag False break if flag:
        count += 1 flag count += 1 count 1 print(count) print count L = list(map(int, input().split())) list(map(int, input().split())) L count = 0 0 count count += 1 1 count combinations = list(itertools.combinations(range(N), 3)) list(itertools.combinations(range(N), 3)) combinations N = int(input()) int(input()) N flag = False False flag flag = True True flag
import itertools

N = int(input())
L = list(map(int, input().split()))

combinations = list(itertools.combinations(range(N), 3))

count = 0
for cmb in combinations:
    flag = True
    for i in range(3):
        if L[cmb[i]] + L[cmb[(i + 1) % 3]] > L[cmb[(i + 2) % 3]] and L[cmb[i]] != L[cmb[(i + 1) % 3]]:
            continue
        else:
            flag = False
            break
    if flag:
        count += 1

print(count)