#include <bits/stdc++.h>
long long g[6][710][710];
int du[710];
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) == 2) {
    memset(g, 0, sizeof(g));
    memset(du, 0, sizeof(du));
    for (int i = 0; i < m; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      u--;
      v--;
      g[1][u][v] = g[1][v][u] = 1;
      du[u]++;
      du[v]++;
    }
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        for (int k = 0; k < n; k++)
          if (k != i && k != j) g[2][i][j] += g[1][i][k] * g[1][k][j];
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        for (int k = 0; k < n; k++)
          if (k != i && k != j)
            g[3][i][j] += (g[2][i][k] - g[1][i][j] * g[1][j][k]) * g[1][k][j];
    long long ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (i == j) continue;
        ans += g[2][i][j] * g[3][j][i];
      }
    }
    for (int i = 0; i < n; i++) ans -= (du[i] - 2) * g[3][i][i] * 2;
    printf("%I64d\n", ans / 10);
  }
  return 0;
}
