#include <bits/stdc++.h>
using namespace std;
int n, m, s[702];
long long c[702][702], d[702][702], e[702][702], ans;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, x, y; i < m; i++) {
    scanf("%d%d", &x, &y);
    s[y]++;
    s[x]++;
    c[x][y] = c[y][x] = 1ll;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) d[i][j] = c[i][j];
  for (int r = 1; r < 3; r++) {
    for (int i = 1; i <= n; i++)
      for (int j = i; j <= n; j++) {
        e[i][j] = 0ll;
        for (int k = 1; k <= n; k++) e[i][j] += c[i][k] * d[k][j];
        e[j][i] = e[i][j];
      }
    for (int i = 1; i <= n && r != 2; i++)
      for (int j = 1; j <= n; j++) d[i][j] = e[i][j];
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) ans += e[i][j] * d[j][i];
  ans /= 10ll;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      if (c[i][j])
        for (int k = j + 1; k <= n; k++)
          if (c[j][k] && c[k][i]) ans -= 1ll * s[i] + s[j] + s[k] - 3ll;
    }
  printf("%I64d\n", ans);
  return 0;
}
