#include <bits/stdc++.h>
using namespace std;
long long deg[701];
long long f[6][701][701];
int N, M;
void york() {
  for (int l = 2; l <= 5; ++l) {
    for (int i = 1; i <= N; ++i)
      for (int j = i; j <= N; ++j) {
        for (int k = 1; k <= N; ++k) f[l][i][j] += f[l - 1][i][k] * f[1][k][j];
        f[l][j][i] = f[l][i][j];
      }
  }
  long long ans = 0;
  for (int i = 1; i <= N; ++i) {
    ans += f[5][i][i];
    if (deg[i] >= 3) ans -= f[3][i][i] * (deg[i] - 2) * 5;
    if (deg[i] >= 2) ans -= f[3][i][i] * 5;
  }
  ans /= 10;
  cout << ans << endl;
}
void init() {
  scanf("%d%d", &N, &M);
  memset(f, 0, sizeof(f));
  memset(deg, 0, sizeof(deg));
  while (M--) {
    int a, b;
    scanf("%d%d", &a, &b);
    f[1][a][b] = 1;
    f[1][b][a] = 1;
    deg[a]++;
    deg[b]++;
  }
}
int main() {
  init();
  york();
  return 0;
}
