#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int NMAX = 700;
int N, G[NMAX][NMAX], P2[NMAX][NMAX], P3[NMAX][NMAX];
void multiply(int (*A)[NMAX], int (*B)[NMAX], int (*C)[NMAX]) {
  for (int i = 0, _n = (N); i < _n; ++i)
    for (int k = 0, _n = (N); k < _n; ++k)
      for (int j = (0), _n = (i); j <= _n; ++j) C[i][j] += A[i][k] * B[k][j];
  for (int i = 0, _n = (N); i < _n; ++i)
    for (int j = (i + 1), _n = (N - 1); j <= _n; ++j) C[i][j] = C[j][i];
}
void print_matrix(int (*A)[NMAX]) {
  for (int i = 0, _n = (N); i < _n; ++i) {
    for (int j = 0, _n = (N); j < _n; ++j) printf("%4d ", A[i][j]);
    printf("\n");
  }
}
int main() {
  int M;
  scanf("%d%d", &N, &M);
  for (int i = 0, _n = (M); i < _n; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    G[a - 1][b - 1] = G[b - 1][a - 1] = 1;
  }
  multiply(G, G, P2);
  multiply(P2, G, P3);
  long long res = 0;
  for (int i = 0, _n = (N); i < _n; ++i)
    for (int k = 0, _n = (N); k < _n; ++k) res += 1LL * P2[i][k] * P3[k][i];
  for (int i = 0, _n = (N); i < _n; ++i) res -= 2LL * P2[i][i] * P3[i][i];
  for (int i = 0, _n = (N); i < _n; ++i)
    for (int k = 0, _n = (N); k < _n; ++k)
      res -= 2LL * G[i][k] * P2[k][k] * P2[k][i];
  for (int i = 0, _n = (N); i < _n; ++i)
    for (int k = 0, _n = (N); k < _n; ++k) res -= G[i][k] * P3[k][k] * G[k][i];
  for (int i = 0, _n = (N); i < _n; ++i)
    for (int k = 0, _n = (N); k < _n; ++k) res += 4 * G[i][k] * P2[k][i];
  for (int i = 0, _n = (N); i < _n; ++i) res += P3[i][i];
  printf("%I64d\n", res / 10);
}
