#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  int dp[4][700][700];
  for (int i = 0; i < 4; ++i)
    for (int j = 0; j < 700; ++j)
      for (int k = 0; k < 700; ++k) dp[i][j][k] = 0;
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    ++dp[0][a][b];
    ++dp[0][b][a];
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (i != j && dp[0][i][j] != 0)
        for (int k = 0; k < n; ++k)
          if (k != i && k != j) dp[1][i][k] += dp[0][i][j] * dp[0][j][k];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (i != j && dp[1][i][j] != 0)
        for (int k = 0; k < n; ++k)
          if (k != i && k != j) dp[2][i][k] += dp[1][i][j] * dp[0][j][k];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (i != j && dp[0][i][j] != 0)
        for (int k = 0; k < n; ++k)
          if (k != i && k != j) dp[2][i][j] -= dp[0][i][j] * dp[0][j][k];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (i != j && dp[2][i][j] != 0)
        for (int k = 0; k < n; ++k)
          if (k != i && k != j) dp[3][i][k] += dp[2][i][j] * dp[0][j][k];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (i != j && dp[1][i][j] != 0) {
        for (int k = 0; k < n; ++k) {
          if (k != i && k != j) {
            dp[3][i][j] -= dp[1][i][j] * dp[0][j][k];
            if (dp[0][i][k] != 0 && dp[0][k][j] != 0) ++dp[3][i][j];
          }
        }
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (i != j && dp[0][i][j] != 0) {
        for (int k = 0; k < n; ++k) {
          if (k != i && k != j && dp[0][j][k] != 0) {
            dp[3][i][j] -= dp[0][i][j] * dp[1][j][k];
            if (dp[0][i][j] != 0 && dp[0][i][k] != 0) ++dp[3][i][j];
          }
        }
      }
    }
  }
  long long odp = 0;
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      if (dp[0][i][j] != 0) odp += dp[3][i][j];
  odp /= 5;
  cout << odp;
  return 0;
}
