#include <bits/stdc++.h>
using namespace std;
const int N = 705;
int n, m;
int deg[N];
long long f[3][N][N];
inline void init() {
  scanf("%d%d", &n, &m);
  for (int i = 1, u, v; i <= m; i++) {
    scanf("%d%d", &u, &v);
    deg[u]++, deg[v]++;
    f[0][u][v] = f[0][v][u] = 1;
  }
}
inline void solve() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      for (int k = 1; k <= n; k++) f[1][i][j] += f[0][i][k] * f[0][k][j];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      for (int k = 1; k <= n; k++) f[2][i][j] += f[0][i][k] * f[1][k][j];
  long long ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) ans += f[1][i][j] * f[2][i][j];
  ans /= 10;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (f[0][i][j])
        for (int k = j + 1; k <= n; k++)
          if (f[0][j][k] && f[0][i][k]) ans -= deg[i] + deg[j] + deg[k] - 3;
  printf(
      "%lld"
      "\n",
      ans);
}
int main() {
  init();
  solve();
  return 0;
}
