#include int main(void){ int n,m,d[64][64] = {0},i,j,k,l,r = 0; scanf("%d%d",&n,&m); for(i = 1;i <= m;i++){ scanf("%d%d",&j,&k); d[j][k]=1;d[k][l] = 1; } for(i = 0;i < n;i++){ for(j = 0;j < n;j++){if(i == j){continue;} for(k = 0;k < n;k++){if(i == k || j == k){continue;} for(l = 0;l < n;l++){if(i == l || j == l || k == l){continue;} if(d[i][j] && d[j][k] && d[k][l] && d[i][l] && !(d[i][k]) && !(d[j][l])){r++;} } } } } printf("%d\n",r/8); return 0; }