#include using namespace std; typedef long long ll; int G[50][50]; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, M; cin >> N >> M; for(int i = 0; i < M; i++) { int a, b; cin >> a >> b; G[a][b] = G[b][a] = 1; } int ans = 0; for(int i = 0; i < N; i++) { for(int j = 0; j < N; j++) { if(i == j || !G[i][j]) continue; for(int k = 0; k < N; k++) { if(i == k || j == k || !G[j][k] || G[i][k]) continue; for(int l = 0; l < N; l++) { if(i == l || j == l || k == l || !G[k][l] || !G[l][i] || G[j][l]) continue; ans++; } } } } cout << ans / 8 << endl; }