// O(N^2 M)
#include <bits/stdc++.h>
using namespace std;

int n, m;
int a[100000];
int b[100000];
bool used[400];
bool sub(int s, int t) {
  for (int i = 0; i < n; ++i) used[i] = false;
  used[s] = true;
  used[t] = true;
  for (int j = m - 1; j >= 0; --j) {
    int x = a[j];
    int y = b[j];
    if (used[x] && used[y]) {
      return false;
    } else if (used[x]) {
      used[y] = true;
    } else if (used[y]) {
      used[x] = true;
    }
  }
  return true;
}

int main() {
  cin >> n >> m;
  for (int j = 0; j < m; ++j) {
    int x, y;
    cin >> x >> y;
    --x; --y;
    a[j] = x;
    b[j] = y;
  }
  
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (sub(i, j)) ++cnt;
    }
  }
  cout << cnt << endl;
  return 0;
}