#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > unity, trans, fin[6], trans_s;
int n, m;
vector<vector<long long> > mat_power(vector<vector<long long> > &a,
                                     vector<vector<long long> > &b) {
  vector<vector<long long> > ret_mat;
  ret_mat.resize(n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) ret_mat[i].push_back(0);
  for (int i = 0; i < a.size(); i++) {
    for (int j = 0; j <= i; j++) {
      for (int k = 0; k < b.size(); k++) ret_mat[i][j] += a[i][k] * b[k][j];
      ret_mat[j][i] = ret_mat[i][j];
    }
  }
  return ret_mat;
}
int main() {
  scanf("%d %d", &n, &m);
  unity.resize(n);
  trans.resize(n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      trans[i].push_back(0);
      unity[i].push_back(0);
    }
    unity[i][i] = 1;
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--, b--;
    trans[a][b] = trans[b][a] = 1;
  }
  trans_s = mat_power(trans, trans);
  fin[2] = trans_s;
  fin[3] = mat_power(fin[2], trans);
  fin[5] = mat_power(fin[3], trans_s);
  long long ret = 0;
  for (int i = 0; i < n; i++) ret += fin[5][i][i];
  long long res = 0LL;
  for (int i = 0; i < n; i++) {
    res += 5LL * fin[3][i][i] * (fin[2][i][i] - 1LL);
  }
  cout << (ret - res) / 10LL << endl;
  return 0;
}
