#include <bits/stdc++.h>
long long n, m, f[7][705][705], ans;
bool v[705][705];
template <typename TYPE>
inline void read(TYPE& x) {
  x = 0;
  int w = 1;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') w = -1;
  for (; c >= '0' && c <= '9';
       x = (x << 3) + (x << 1) + (c ^ 48), c = getchar())
    ;
  x *= w;
}
int main() {
  read(n);
  read(m);
  int a, b;
  for (register int i = 0; i < m; i++) {
    read(a);
    read(b);
    --a;
    --b;
    f[0][a][b] = 1;
    f[0][b][a] = 1;
  }
  for (register int l = 0; l < 2; l++)
    for (register int i = 0; i < n; i++)
      for (register int j = 0; j < n; j++)
        if (f[l][i][j]) {
          for (register int k = 0; k < n; k++)
            if (f[0][j][k]) f[l + 1][i][k] += f[l][i][j];
        }
  for (register int i = 0; i < n; i++)
    for (register int j = i + 1; j < n; j++)
      for (register int k = 0; k < n; k++)
        if (f[0][i][k] && f[0][j][k] && f[2][i][j]) {
          ans += f[2][i][j] - f[1][i][k] - f[1][j][k];
          if (f[0][i][j]) ans -= f[1][i][i] + f[1][j][j] - 3;
        }
  printf("%lld\n", ans / 5);
  return 0;
}
