#include <bits/stdc++.h>
using namespace std;
int cond = 1;
bool e[705][705];
long long path3[705][705];
int n, m;
long long res;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    e[a][b] = e[b][a] = true;
  }
  for (__typeof(1) i = (1); i <= (n); ++i)
    for (__typeof(i + 1) k = (i + 1); k <= (n); ++k) {
      if (k == i) continue;
      for (__typeof(1) j = (1); j <= (n); ++j)
        if (e[i][j] && e[j][k]) ++path3[i][k];
      path3[k][i] = path3[i][k];
    }
  for (__typeof(1) i = (1); i <= (n); ++i)
    for (__typeof(i + 1) j = (i + 1); j <= (n); ++j) {
      long long p4 = 0;
      for (__typeof(1) k = (1); k <= (n); ++k) {
        if (k != i && e[k][j]) {
          p4 += path3[i][k] - e[i][j];
        }
      }
      for (__typeof(1) k = (1); k <= (n); ++k) {
        if (e[i][k] && e[j][k]) {
          res += p4 - path3[i][k] - path3[j][k];
          if (e[i][j]) res += 2;
        }
      }
    }
  cout << res / 5 << endl;
  return 0;
}
