#include <bits/stdc++.h>
using namespace std;
int dp[3][700][700];
int n, m;
int main() {
  int i, j, k, x, y;
  scanf("%d%d", &n, &m);
  for (i = 0; i < m; ++i) {
    scanf("%d%d", &x, &y);
    --x;
    --y;
    ++dp[0][x][y];
    ++dp[0][y][x];
  }
  for (i = 0; i < n; ++i)
    for (j = i + 1; j < n; ++j) {
      for (k = 0; k < n; ++k)
        if (k != i && k != j && dp[0][i][k] && dp[0][k][j]) ++dp[1][i][j];
      dp[1][j][i] = dp[1][i][j];
    }
  for (i = 0; i < n; ++i)
    for (j = i + 1; j < n; ++j) {
      for (k = 0; k < n; ++k)
        if (k != i && k != j && dp[0][k][j]) {
          dp[2][i][j] += dp[1][i][k] * dp[0][k][j];
          if (dp[0][i][j] && dp[0][j][k]) --dp[2][i][j];
        }
      dp[2][j][i] = dp[2][i][j];
    }
  long long ans = 0;
  for (k = 0; k < n; ++k)
    for (i = 0; i < n; ++i) {
      if (k == i) continue;
      for (j = i + 1; j < n; ++j)
        if (k != j && dp[0][i][k] && dp[0][k][j]) {
          ans += dp[2][i][j];
          ans -= dp[1][k][j];
          ans -= dp[1][i][k];
          if (dp[0][i][j]) ans += 2;
        }
    }
  cout << ans / 5 << '\n';
  return 0;
}
