#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) bool edge[50][50]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; REP (i, m) { int u, v; cin >> u >> v; edge[u][v] = edge[v][u] = 1; } int ret = 0; REP (a, n) REP (b, n) { if (a == b) continue; if (!edge[a][b]) continue; REP (c, n) { if (c == a || c == b) continue; if (!edge[a][c] || edge[b][c]) continue; REP (d, n) { if (d == a || d == b || d == c) continue; if (edge[b][d] && edge[c][d] && !edge[a][d]) ++ret; } } } cout << ret / 8 << endl; return 0; }