#include <bits/stdc++.h>
using namespace std;
long long cnt[705];
long long way3[705][705];
long long way4[705][705];
bool edge[705][705];
int main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < ((long long)705); i++)
    for (long long j = 0; j < ((long long)705); j++) edge[i][j] = false;
  for (long long i = 0; i < ((long long)m); i++) {
    long long a, b;
    cin >> a >> b;
    edge[a - 1][b - 1] = edge[b - 1][a - 1] = true;
  }
  for (long long i = 0; i < ((long long)705); i++)
    for (long long j = 0; j < ((long long)705); j++)
      way3[i][j] = way4[i][j] = 0;
  for (long long i = 0; i < ((long long)n); i++)
    for (long long j = 0; j < ((long long)n); j++)
      for (long long k = 0; k < ((long long)n); k++)
        if (edge[i][k] && edge[j][k] && i != j) way3[i][j]++;
  for (long long i = 0; i < ((long long)n); i++)
    for (long long j = 0; j < ((long long)n); j++)
      for (long long k = 0; k < ((long long)n); k++)
        if (edge[j][k] && i != j && i != k) {
          way4[i][k] += way3[i][j];
          if (edge[i][k]) way4[i][k]--;
        }
  long long res = 0;
  for (long long i = 0; i < ((long long)n); i++)
    for (long long j = 0; j < ((long long)n); j++)
      res += way3[i][j] * way4[i][j];
  for (long long i = 0; i < ((long long)705); i++) cnt[i] = 0;
  for (long long i = 0; i < ((long long)n); i++)
    for (long long j = 0; j < ((long long)n); j++)
      if (edge[i][j]) cnt[i]++;
  long long bad = 0;
  for (long long i = 0; i < ((long long)n); i++)
    for (long long j = 0; j < ((long long)n); j++)
      for (long long k = 0; k < ((long long)n); k++)
        if (edge[i][j] && edge[j][k] && edge[i][k]) {
          bad += 2 * (cnt[i] - 2) + 2 * (cnt[j] - 2) + 2 * (cnt[k] - 2);
        }
  cout << (res - bad / 3) / 10 << endl;
}
