#include <bits/stdc++.h>
using namespace std;
int n, e, deg[710];
long long dyn[5][710][710], ans;
int main() {
  scanf("%d%d", &n, &e);
  for (int i = 0; i < e; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a;
    --b;
    deg[a]++;
    deg[b]++;
    dyn[0][a][b] = dyn[0][b][a] = 1;
  }
  for (int i = 1; i <= 4; i++)
    for (int j = 0; j < n; j++)
      for (int k = 0; k < n; k++)
        for (int l = 0; l < n; l++)
          dyn[i][j][l] += dyn[i - 1][j][k] * dyn[0][k][l];
  for (int i = 0; i < n; i++) ans += dyn[4][i][i];
  ans /= 10;
  for (int i = 0; i < n; i++) ans -= ((deg[i] - 2) * dyn[2][i][i]) / 2;
  long long sum = 0;
  for (int i = 0; i < n; i++) sum += dyn[2][i][i];
  sum /= 6;
  ans -= sum * 3;
  cout << ans << endl;
  return 0;
}
