#include <bits/stdc++.h>
const int MAXN = 707;
typedef int Mat[MAXN][MAXN];
void mul(int n, const int a[MAXN][MAXN], const int b[MAXN][MAXN],
         int c[MAXN][MAXN]) {
  for (int i = 1; i <= n; ++i) {
    for (int j = i; j <= n; ++j) {
      for (int k = 1; k <= n; ++k) {
        c[i][j] += a[i][k] * b[j][k];
      }
      c[j][i] = c[i][j];
    }
  }
}
int c[MAXN];
Mat e, e2, e3;
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, e, e2, e3);
  for (int i = 1; i <= n; ++i) {
    for (int k = 1; k <= n; ++k) {
      ans += (long long)e3[i][k] * e2[k][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;
}
