#include using namespace std; int n, m, ans = 0; bool rel[50][50] = {}; int main(){ cin >> n >> m; for (int i = 0; i < m; i++){ int a = 0, b = 0; cin >> a >> b; rel[a][b] = true; rel[b][a] = true; } for (int i = 0; i < n; i++){ for (int j = i + 1; j < n; j++){ if (rel[i][j]){ for (int k = j + 1; k < n; k++){ if (!rel[j][k] && rel[i][k]){ for (int l = i + 1; l < n; l++){ if (!rel[i][l] && rel[j][l] && rel[k][l]){ ans++; } } } } } } } cout << ans; return 0; }