#include <bits/stdc++.h>
using namespace std;
const int MaxN = 705;
long long g[4][MaxN][MaxN];
int d[MaxN];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--;
    y--;
    g[1][x][y] = g[1][y][x] = 1;
    d[x]++;
    d[y]++;
  }
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      if (i != k)
        for (int j = 0; j < n; j++)
          if (j != k) g[2][i][j] += g[1][i][k] * g[1][k][j];
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      if (i != k)
        for (int j = 0; j < n; j++)
          if (j != k)
            g[3][i][j] += g[1][i][k] * (g[2][k][j] - g[1][k][i] * g[1][i][j]);
  long long ans = 0;
  for (int k = 0; k < n; k++) {
    ans -= g[3][k][k] * (d[k] - 2) * 2;
    for (int i = 0; i < n; i++)
      if (i != k) ans += g[3][i][k] * g[2][k][i];
  }
  printf("%I64d\n", ans / 10);
  return 0;
}
