n = int(input())
l = input()
l = l.split()
a = 0
b = 1
c = 2
e = [0]
for d in range(int(n*(n-1)*(n-2)/6)):
    e.append(int(l[a]))
    e.append(int(l[b]))
    e.append(int(l[c]))
    if b == n - 2 and c == n - 1:
        a = a + 1
        b = a + 1
        c = a + 2
    elif c == n - 1:
        b = b + 1
        c = b + 1
    else:
        c = c + 1
j = 0
for f in range(int((len(e)-1)/3)):
    g = e[f*3+1]
    h = e[f*3+2]
    i = e[f*3+3]
    if g != h and h != i and g != i:
        if g + h > i and h + i > g and g + i > h:
            j = j + 1
print(j) n = int(input()) n int(input()) int input() input l = input() l input() input l = l.split() l l.split() l.split l split a = 0 a 0 b = 1 b 1 c = 2 c 2 e = [0] e [0] 0 for d in range(int(n*(n-1)*(n-2)/6)):
    e.append(int(l[a]))
    e.append(int(l[b]))
    e.append(int(l[c]))
    if b == n - 2 and c == n - 1:
        a = a + 1
        b = a + 1
        c = a + 2
    elif c == n - 1:
        b = b + 1
        c = b + 1
    else:
        c = c + 1 d range(int(n*(n-1)*(n-2)/6)) range int(n*(n-1)*(n-2)/6) int n*(n-1)*(n-2)/6 n*(n-1)*(n-2) n*(n-1) n n-1 n 1 n-2 n 2 6 e.append(int(l[a])) e.append e append int(l[a]) int l[a] l a e.append(int(l[b])) e.append e append int(l[b]) int l[b] l b e.append(int(l[c])) e.append e append int(l[c]) int l[c] l c if b == n - 2 and c == n - 1:
        a = a + 1
        b = a + 1
        c = a + 2
    elif c == n - 1:
        b = b + 1
        c = b + 1
    else:
        c = c + 1 b == n - 2 and c == n - 1 b == n - 2 b n - 2 n 2 c == n - 1 c n - 1 n 1 a = a + 1 a a + 1 a 1 b = a + 1 b a + 1 a 1 c = a + 2 c a + 2 a 2 elif c == n - 1:
        b = b + 1
        c = b + 1
     c == n - 1 c n - 1 n 1 b = b + 1 b b + 1 b 1 c = b + 1 c b + 1 b 1 c = c + 1 c c + 1 c 1 j = 0 j 0 for f in range(int((len(e)-1)/3)):
    g = e[f*3+1]
    h = e[f*3+2]
    i = e[f*3+3]
    if g != h and h != i and g != i:
        if g + h > i and h + i > g and g + i > h:
            j = j + 1 f range(int((len(e)-1)/3)) range int((len(e)-1)/3) int (len(e)-1)/3 len(e)-1 len(e) len e 1 3 g = e[f*3+1] g e[f*3+1] e f*3+1 f*3 f 3 1 h = e[f*3+2] h e[f*3+2] e f*3+2 f*3 f 3 2 i = e[f*3+3] i e[f*3+3] e f*3+3 f*3 f 3 3 if g != h and h != i and g != i:
        if g + h > i and h + i > g and g + i > h:
            j = j + 1 g != h and h != i and g != i g != h and h != i g != h g h h != i h i g != i g i if g + h > i and h + i > g and g + i > h:
            j = j + 1 g + h > i and h + i > g and g + i > h g + h > i and h + i > g g + h > i g + h g h i h + i > g h + i h i g g + i > h g + i g i h j = j + 1 j j + 1 j 1 print(j) print j c = 2 2 c e = [0] [0] e l = l.split() l.split() l a = a + 1 a + 1 a j = j + 1 j + 1 j b = a + 1 a + 1 b i = e[f*3+3] e[f*3+3] i n = int(input()) int(input()) n c = a + 2 a + 2 c b = b + 1 b + 1 b b = 1 1 b h = e[f*3+2] e[f*3+2] h a = 0 0 a c = c + 1 c + 1 c c = b + 1 b + 1 c g = e[f*3+1] e[f*3+1] g l = input() input() l j = 0 0 j
n = int(input())
l = input()
l = l.split()
a = 0
b = 1
c = 2
e = [0]
for d in range(int(n*(n-1)*(n-2)/6)):
    e.append(int(l[a]))
    e.append(int(l[b]))
    e.append(int(l[c]))
    if b == n - 2 and c == n - 1:
        a = a + 1
        b = a + 1
        c = a + 2
    elif c == n - 1:
        b = b + 1
        c = b + 1
    else:
        c = c + 1
j = 0
for f in range(int((len(e)-1)/3)):
    g = e[f*3+1]
    h = e[f*3+2]
    i = e[f*3+3]
    if g != h and h != i and g != i:
        if g + h > i and h + i > g and g + i > h:
            j = j + 1
print(j)