#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const int MAXN = 707;
bool isAdj[MAXN][MAXN];
int cntAdj[MAXN][MAXN];
int degree[MAXN];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    isAdj[u - 1][v - 1] = true;
    isAdj[v - 1][u - 1] = true;
    ++degree[u - 1];
    ++degree[v - 1];
  }
  for (int u = 0; u < n; ++u)
    for (int v = 0; v < n; ++v)
      if (u != v)
        for (int cvert = 0; cvert < n; ++cvert)
          if (isAdj[u][cvert] && isAdj[v][cvert]) {
            ++cntAdj[u][v];
          }
  long long answer = 0;
  for (int u = 0; u < n; ++u)
    for (int v = u; v < n; ++v)
      for (int mvert = 0; mvert < n; ++mvert)
        if (isAdj[u][v] && mvert != u && mvert != v) {
          int um = cntAdj[u][mvert];
          int vm = cntAdj[v][mvert];
          if (isAdj[u][mvert]) {
            --vm;
          }
          if (isAdj[v][mvert]) {
            --um;
          }
          answer += 1LL * um * vm;
          if (isAdj[u][mvert] && isAdj[v][mvert]) {
            answer -= degree[mvert] - 2;
          }
        }
  printf("%I64d\n", answer / 5);
  return 0;
}
