#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool debug = false;
long long mp[3][705][705];
long long d[705];
int main() {
  scanf("%d%d", &n, &m);
  int a, b;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    d[a]++;
    d[b]++;
    mp[0][a][b] = 1;
    mp[0][b][a] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= n; k++) {
        mp[1][i][j] += mp[0][i][k] * mp[0][k][j];
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= n; k++) {
        mp[2][i][j] += mp[0][i][k] * mp[1][k][j];
      }
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      ans += mp[2][i][j] * mp[1][i][j];
    }
  }
  ans /= 10;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      for (int k = j + 1; k <= n; k++) {
        if (mp[0][i][j] && mp[0][j][k] && mp[0][k][i]) {
          ans -= d[i] + d[j] + d[k] - 3;
        }
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
