#include <bits/stdc++.h>
using namespace std;
int adj1[705][705], adj2[705][705], adj3[705][705];
int main() {
  long long ans = 0;
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj1[a][b] = 1;
    adj1[b][a] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= n; k++) {
        adj2[i][j] += (adj1[i][k] * adj1[k][j]);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= n; k++) {
        adj3[i][j] += (adj2[i][k] * adj1[k][j]);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (!adj1[i][j]) continue;
      for (int k = 1; k <= n; k++) {
        if (!adj1[j][k]) continue;
        if (j == k || i == k) continue;
        long long c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5;
        if (adj1[k][i]) c1 = adj2[i][i];
        if (adj1[k][j]) c2 = adj2[j][i];
        c3 = adj2[k][j];
        if (adj1[k][i]) c3--;
        if (adj1[k][i]) c4 = adj2[k][k] - 2;
        ans += adj3[k][i] - c1 - c2 - c3 - c4;
      }
    }
  }
  printf("%lld\n", ans / 10);
}
