import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int M = scan.nextInt(); int[]a = new int[M]; int[]b = new int[M]; for(int i = 0; i < M; i++) { a[i] = scan.nextInt(); b[i] = scan.nextInt(); } scan.close(); if(M < 4 || N < 4) { System.out.println(0); System.exit(0); } int[][]G = new int[N][N]; for(int i = 0; i < M; i++) { G[a[i]][b[i]] = 1; G[b[i]][a[i]] = 1; } int cnt = 0; for(int i = 0; i < N - 3; i++) { for(int j = i + 1; j < N - 2; j++) { for(int k = j + 1; k < N - 1; k++) { for(int l = k + 1; l < N; l++) { int d1 = G[i][j] + G[i][k] + G[i][l]; int d2 = G[j][i] + G[j][k] + G[j][l]; int d3 = G[k][i] + G[k][j] + G[k][l]; int d4 = G[l][i] + G[l][j] + G[l][k]; if(d1 == 2 && d2 == 2 && d3 == 2 && d4 == 2) { cnt ++; } } } } } System.out.println(cnt); } }