#include <bits/stdc++.h>
using namespace std;
const int N = 710;
int n, m;
int kolko[N], mat[N][N], how[N][N];
long long sol;
int main(void) {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    --a;
    --b;
    mat[a][b] = 1;
    mat[b][a] = 1;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (i == j) continue;
      for (int k = 0; k < n; ++k) {
        if (i == k || j == k) continue;
        if (!mat[i][k] || !mat[j][k]) continue;
        ++how[i][j];
      }
    }
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (mat[i][j]) ++kolko[i];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (!mat[i][j]) continue;
      for (int k = 0; k < n; ++k) {
        if (i == k || j == k) continue;
        sol += (how[i][k] - (mat[i][j] * mat[j][k])) *
               (long long)(how[j][k] - (mat[i][j] * mat[i][k]));
      }
    }
  }
  long long tre = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (!mat[i][j]) continue;
      for (int k = 0; k < n; ++k) {
        if (!mat[i][k] || !mat[j][k]) continue;
        tre += (kolko[i] - 2 + kolko[j] - 2 + kolko[k] - 2);
      }
    }
  }
  sol -= tre / 3;
  cout << sol / 10 << endl;
  return 0;
}
