#include <bits/stdc++.h>
using namespace std;
int N, M;
long long ans = 0;
int ex[705][705];
int p[705][705];
int dig[705];
int main() {
  scanf("%d %d", &N, &M);
  for (int i = 0; i < M; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--;
    b--;
    ex[a][b] = 1;
    ex[b][a] = 1;
    dig[a]++;
    dig[b]++;
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      for (int k = 0; k < N; k++) {
        if (ex[i][k] && ex[k][j]) p[i][j]++;
      }
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      for (int k = 0; k < N; k++) {
        if (ex[i][j] && i != k && j != k) {
          ans +=
              (long long)(p[i][k] - ex[j][k]) * (long long)(p[j][k] - ex[i][k]);
          if (ex[i][k] && ex[j][k]) ans -= dig[k] - 2;
        }
      }
    }
  }
  cout << ans / 5ll << endl;
  return 0;
}
