#include <bits/stdc++.h>
using namespace std;
bool g[710][710];
vector<int> one;
long long dp[710];
int n, m;
long long calc(int rt) {
  one.clear();
  for (int i = 1; i <= n; i++)
    if (g[rt][i]) one.push_back(i);
  memset(dp, 0, sizeof(dp));
  int len = one.size();
  for (int i = 0; i < len; i++) {
    int u = one[i];
    for (int v = 1; v <= n; v++)
      if (g[u][v] && v != rt) dp[v]++;
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (dp[i] == 0) continue;
    for (int j = i + 1; j <= n; j++) {
      if (dp[j] == 0 || !g[i][j]) continue;
      ans += dp[i] * dp[j];
    }
  }
  return ans;
}
long long calc_three() {
  long long ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      for (int k = j + 1; k <= n; k++)
        if (g[i][j] && g[i][k] && g[k][j]) ans++;
  return ans;
}
long long du[710];
long long calc_four() {
  long long ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      for (int k = j + 1; k <= n; k++)
        if (g[i][j] && g[i][k] && g[k][j]) {
          ans += du[i] - 2;
          ans += du[j] - 2;
          ans += du[k] - 2;
        }
  return ans;
}
int main() {
  scanf("%d %d", &n, &m);
  memset(du, 0, sizeof(du));
  memset(g, false, sizeof(g));
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    g[x][y] = g[y][x] = true;
    du[x]++;
    du[y]++;
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans += calc(i);
  long long three = calc_three();
  long long four = calc_four();
  ans = ans - three * 3 - four * 3;
  ans /= 5;
  cout << ans << endl;
  return 0;
}
