from itertools import * N, M = map(int, input().split()) S = set() for i in range(M): a, b = map(int, input().split()) S.add( (a, b) ) ans = 0 for a, b, c, d in combinations(range(N), 4): cnt = 0 for tup in combinations([a, b, c, d], 2): if tup in S: cnt += 1 if cnt != 4: continue cnt = 0 for tup in combinations([a, b, c], 2): if tup in S: cnt += 1 if cnt != 2: continue cnt = 0 for tup in combinations([a, b, d], 2): if tup in S: cnt += 1 if cnt != 2: continue cnt = 0 for tup in combinations([a, c, d], 2): if tup in S: cnt += 1 if cnt != 2: continue cnt = 0 for tup in combinations([b, c, d], 2): if tup in S: cnt += 1 if cnt != 2: continue ans += 1 print(ans)