#include <bits/stdc++.h>
using namespace std;
long long g[5][710][710];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<int> deg(n);
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a, --b;
    ++g[0][a][b];
    ++g[0][b][a];
    ++deg[a];
    ++deg[b];
  }
  for (int len = 1; len < 5; ++len) {
    for (int a = 0; a < n; ++a)
      for (int b = 0; b < n; ++b)
        for (int c = a; c < n; ++c)
          g[len][a][c] += g[len - 1][a][b] * g[0][b][c];
    for (int a = 0; a < n; ++a)
      for (int c = 0; c < a; ++c) g[len][a][c] = g[len][c][a];
  }
  long long res = 0;
  for (int a = 0; a < n; ++a) {
    res += g[4][a][a];
    if (deg[a]) res -= g[2][a][a] * (deg[a] - 1) * 5;
  }
  cout << res / 10 << endl;
  return 0;
}
