#include <bits/stdc++.h>
using namespace std;
struct h {
  long long f, s;
  bool operator==(h o) { return f == o.f && s == o.s; }
  bool operator<(h o) const {
    if (f != o.f) return f < o.f;
    return s < o.s;
  }
  h operator^=(h o) {
    f ^= o.f;
    s ^= o.s;
    return *this;
  }
  h operator^(h o) { return {f ^ o.f, s ^ o.s}; }
};
long long genll() {
  long long r = rand();
  r <<= 16;
  r += rand();
  r <<= 16;
  r += rand();
  r <<= 16;
  r += rand();
  return r;
}
h genh() { return {genll(), genll()}; }
h hashes[1000007];
h acum[1000007];
map<h, int> ma;
int n, m, t, a, b, c;
int main() {
  long long r = 0;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    hashes[i] = genh();
  }
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    acum[a] ^= hashes[b];
    acum[b] ^= hashes[a];
  }
  for (int i = 1; i <= n; i++) {
  }
  for (int i = 1; i <= n; i++) {
    r += ma[acum[i]];
    r += ma[acum[i] ^ hashes[i]];
    ma[acum[i]]++;
    ma[acum[i] ^ hashes[i]]++;
  }
  printf("%lld\n", r);
  return 0;
}
