#include <bits/stdc++.h>
bool edge[704][704];
int cnt[704][704];
int degree[704];
int N, M;
inline int query(int A, int B, int C) {
  return edge[A][C] && edge[B][C] ? cnt[A][B] - 1 : cnt[A][B];
}
int main(void) {
  int A, B;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < M; ++i) {
    scanf("%d%d", &A, &B);
    edge[A][B] = edge[B][A] = true;
    ++degree[A];
    ++degree[B];
  }
  for (int i = 1; i <= N; ++i)
    for (int j = 1; j <= N; ++j)
      for (int k = 1; k <= N; ++k)
        if (edge[i][k] && edge[j][k]) ++cnt[i][j];
  long long result = 0;
  for (int i = 1; i <= N; ++i)
    for (int j = i + 1; j <= N; ++j) {
      if (!edge[i][j]) continue;
      for (int k = 1; k <= N; ++k) {
        if (i == k || j == k) continue;
        if (edge[i][k] && edge[j][k]) result -= degree[k] - 2;
        result += (long long)query(i, k, j) * query(j, k, i);
      }
    }
  printf("%I64d\n", result / 5);
  return 0;
}
