#include <bits/stdc++.h>
using namespace std;
const int MN = 700 + 10;
int st[MN], dp[MN][MN], sm[MN][MN];
int main() {
  int n, m;
  long long ans = 0;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    st[a]++;
    st[b]++;
    sm[a][b] = sm[b][a] = 1;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      for (int k = 0; k < n; k++)
        if (sm[i][k] && sm[k][j]) dp[i][j]++;
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++) {
      if (!sm[i][j]) continue;
      for (int k = 0; k < n; k++) {
        if (i == k || j == k) continue;
        int a = dp[i][k];
        int b = dp[j][k];
        if (sm[i][k] == 1) b--;
        if (sm[j][k] == 1) a--;
        ans += (long long)a * b;
        if (sm[i][k] == 1 && sm[j][k] == 1) ans -= ((long long)st[k] - 2);
      }
    }
  cout << ans / 5;
  return 0;
}
