#include <bits/stdc++.h>
int am[700][700];
long long ans[6][700][700];
int n;
int main() {
  int m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    am[u - 1][v - 1] = am[v - 1][u - 1] = 1;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) ans[1][i][j] = am[i][j];
  for (int l = 2; l < 4; l++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        ans[l][i][j] = 0;
        for (int k = 0; k < n; k++)
          ans[l][i][j] += ans[l - 1][i][k] * ans[1][k][j];
      }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      ans[5][i][j] = 0;
      for (int k = 0; k < n; k++) ans[5][i][j] += ans[3][i][k] * ans[2][k][j];
    }
  long long ret = 0;
  for (int i = 0; i < n; i++) ret += ans[5][i][i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) ret -= ans[1][i][j] * ans[3][j][j];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      ret -= ans[1][i][j] * ans[2][i][j] * ans[2][j][j] * 2;
  for (int i = 0; i < n; i++) ret -= ans[2][i][i] * ans[3][i][i] * 2;
  for (int i = 0; i < n; i++) ret += ans[3][i][i] * 5;
  printf("%I64d\n", ret / 10);
}
