import sys input=sys.stdin.readline N,M=map(int,input().split()) B=[set() for _ in range(N+1)] for _ in range(M): a,b=map(int,input().split()) B[a].add(b) B[b].add(a) K=0 T=list(range(1,N+1)) for i in T: for j in range(i+1,N+1): for k in range(j+1,N+1): F=True F&=(B[i] & B[j]==set()) or (j in B[i]) F&=(B[j] & B[k]==set()) or (k in B[j]) F&=(B[k] & B[i]==set()) or (i in B[k]) if F: K+=1 print(K)