#include <bits/stdc++.h>
using namespace std;
bool adj[702][702];
int mid[702][702];
int deg[702];
int m, n;
long long sum = 0;
bool notEq(int i, int j, int k) { return i != j && i != k && j != k; }
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0, a, b; i < m; ++i) {
    scanf("%d %d", &a, &b);
    --a, --b;
    adj[a][b] = adj[b][a] = true;
    ++deg[a];
    ++deg[b];
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      for (int k = 0; k < n; ++k)
        if (notEq(i, j, k) && adj[i][k] && adj[k][j]) ++mid[i][j];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      for (int k = 0; k < n; ++k)
        if (notEq(i, j, k) && adj[j][k]) {
          int l = mid[i][j], r = mid[i][k];
          if (adj[i][k]) --l;
          if (adj[i][j]) --r;
          sum += l * r;
        }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      for (int k = 0; k < n; ++k)
        if (notEq(i, j, k) && adj[i][j] && adj[k][i] && adj[j][k])
          sum -= deg[i] - 2;
  cout << sum / 10 << '\n';
  return 0;
}
