#include <bits/stdc++.h>
using namespace std;
const int DIM = 705;
bool edg[DIM][DIM];
int cnt[DIM][DIM], deg[DIM];
inline int count(int x, int y, int z) {
  return cnt[x][y] - (edg[z][x] and edg[z][y]);
}
int main(void) {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int x, y;
    cin >> x >> y;
    edg[x][y] = edg[y][x] = true;
    ++deg[x];
    ++deg[y];
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      for (int k = 1; k <= n; ++k)
        if (i != j and edg[k][i] and edg[k][j]) ++cnt[i][j];
  long long ans = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (!edg[i][j]) continue;
      for (int k = 1; k <= n; ++k) {
        if (k == i or k == j) continue;
        if (edg[k][i] and edg[k][j]) ans -= deg[k] - 2;
        ans += 1LL * count(i, k, j) * count(j, k, i);
      }
    }
  }
  cout << ans / 10 << endl;
  return 0;
}
