#include <bits/stdc++.h>
using namespace std;
int n, m;
int g[1010][1010];
long long a[1010], b[1010], ans = 0LL;
int main() {
  cin >> n >> m;
  memset(g, 0, sizeof(g));
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    g[x][y] = g[y][x] = 1;
  }
  memset(a, 0, sizeof(a));
  for (int i = 1; i <= n; i++)
    for (int x = 1; x <= n; x++)
      if (g[i][x])
        for (int y = x + 1; y <= n; y++)
          if (g[i][y] && g[x][y]) a[i]++;
  for (int st = 1; st <= n; st++) {
    memset(b, 0, sizeof(b));
    for (int j = 1; j <= n; j++)
      if (g[j][st])
        for (int i = 1; i <= n; i++)
          if (g[i][j]) b[i]++;
    for (int i = 1; i <= n; i++)
      if (i != st)
        for (int j = i + 1; j <= n; j++)
          if (j != st && g[i][j]) {
            long long Bi = b[i], Bj = b[j];
            if (g[i][st]) Bj--;
            if (g[j][st]) Bi--;
            ans += Bi * Bj;
          }
    for (int i = 1; i <= n; i++)
      if (g[i][st]) {
        long long cur = a[i];
        for (int j = 1; j <= n; j++)
          if (g[i][j] && g[j][st]) cur--;
        ans -= cur;
      }
  }
  ans /= 5LL;
  cout << ans << endl;
  return 0;
}
