#include <bits/stdc++.h>
using namespace std;
long long A[710][710], B[710][710];
int deg[710];
int n, m;
long long ans;
void input() {
  int x, y;
  memset(A, 0, sizeof(A));
  memset(deg, 0, sizeof(deg));
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    A[x][y] = A[y][x] = 1;
    deg[x]++;
    deg[y]++;
  }
}
void solve() {
  memset(B, 0, sizeof(B));
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      for (int k = 1; k <= n; k++)
        if (k != i && k != j && A[i][k] && A[k][j]) B[j][i] = ++B[i][j];
  ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (A[i][j])
        for (int k = 1; k <= n; k++)
          if (k != i && k != j) {
            ans += (B[i][k] - A[j][k]) * (B[j][k] - A[i][k]);
            if (A[i][k] && A[k][j]) ans -= (deg[k] - 2);
          }
  cout << ans / 5 << endl;
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    input();
    solve();
  }
  return 0;
}
