#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
int matrix[4][701][701];
int n, m;
int main() {
  while (scanf("%d %d", &n, &m) > 0) {
    memset((matrix), 0, sizeof(matrix));
    for (int i = 0; i < (int)(m); i++) {
      int from, to;
      scanf("%d %d", &from, &to);
      from--;
      to--;
      matrix[1][from][to] = 1;
      matrix[1][to][from] = 1;
    }
    for (int k = 0; k < (int)(n); k++)
      for (int i = 0; i < (int)(n); i++)
        for (int j = 0; j < (int)(n); j++) {
          if (i == k || j == k || i == j) {
            continue;
          }
          matrix[2][i][j] += matrix[1][i][k] * matrix[1][k][j];
        }
    for (int k = 0; k < (int)(n); k++)
      for (int i = 0; i < (int)(n); i++)
        for (int j = 0; j < (int)(n); j++) {
          if (i == k || j == k || i == j) {
            continue;
          }
          matrix[3][i][j] += matrix[2][i][k] * matrix[1][k][j] -
                             matrix[1][i][j] * matrix[1][j][k];
        }
    long long ans = 0;
    for (int k = 0; k < (int)(n); k++)
      for (int i = 0; i < (int)(n); i++)
        for (int j = 0; j < (int)(n); j++) {
          if (i == k || j == k || i == j) {
            continue;
          }
          long long lans = matrix[1][i][k] * matrix[1][k][j];
          lans *= matrix[3][i][j] -
                  (matrix[2][i][k] - matrix[1][i][j] * matrix[1][j][k]) *
                      matrix[1][k][j] -
                  matrix[1][i][k] *
                      (matrix[2][k][j] - matrix[1][k][i] * matrix[1][i][j]);
          ans += lans;
        }
    cout << ans / 10 << endl;
  }
}
