#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c & operator [](int n){return d[n];} }; int main(int argc, char const *argv[]) { ll n, m;std::cin >> n >> m; WS ws(n+1); re(i, m){ ll a, b;std::cin >> a >> b; ws.insert(a, b, 1); ws.insert(b, a, 1); } ws.warshall(); ll ans = 0; for(int i=1;i<=n;i++){ for(int j=i+1;j<=n;j++){ for(int k=j+1;k<=n;k++){ if(ws[i][j]!=2&&ws[i][k]!=2&&ws[j][k]!=2) ans++; } } } std::cout << ans << '\n'; }