#include <bits/stdc++.h>
const int MAXN = 707;
template <typename S, typename T>
void mul(int n, const S a[MAXN][MAXN], const S b0[MAXN][MAXN],
         T c[MAXN][MAXN]) {
  static S b[MAXN][MAXN];
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      b[i][j] = b0[j][i];
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i; j <= n; ++j) {
      for (int k = 1; k <= n; ++k) {
        c[i][j] += (T)a[i][k] * b[j][k];
      }
      c[j][i] = c[i][j];
    }
  }
}
int c[MAXN];
int e[MAXN][MAXN], e2[MAXN][MAXN], e4[MAXN][MAXN];
long long e5[MAXN][MAXN];
int main() {
  int n, m, a, b;
  long long ans;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &a, &b);
    e[a][b] = e[b][a] = 1;
    ++c[a];
    ++c[b];
  }
  ans = 0;
  mul(n, e, e, e2);
  mul(n, e2, e2, e4);
  mul(n, e, e4, e5);
  for (int i = 1; i <= n; ++i) {
    ans += e5[i][i];
  }
  ans /= 10;
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (e[i][j] == 0) {
        continue;
      }
      a = c[i] + c[j];
      for (int k = j + 1; k <= n; ++k) {
        if (e[i][k] == 0 || e[j][k] == 0) {
          continue;
        }
        ans -= a + c[k] - 3;
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
