#include <bits/stdc++.h>
using namespace std;
const int MAXN = 700;
int g[MAXN][MAXN], a[MAXN][MAXN], deg[MAXN];
int main() {
  int n, m, x, y;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    --x;
    --y;
    g[x][y] = g[y][x] = 1;
    deg[x]++;
    deg[y]++;
  }
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++) {
      int res = 0;
      for (int k = 0; k < n; k++) {
        if (!g[i][k] || !g[j][k]) continue;
        res++;
      }
      a[i][j] = a[j][i] = res;
    }
  long long ans = 0;
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++) {
      if (!g[i][j]) continue;
      for (int k = 0; k < n; k++) {
        if (i == k || j == k) continue;
        int aa = a[i][k];
        int bb = a[j][k];
        if (g[i][k]) bb--;
        if (g[j][k]) aa--;
        ans = ans + aa * bb;
        if (g[i][k] == 1 && g[j][k] == 1) ans = ans - deg[k] + 2;
      }
    }
  printf("%I64d\n", ans / 5);
  return 0;
}
