#include using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; vector G(N,vector(0,0)); vector D(N,0ll); for(int i=0;i>U>>V; --U,--V; G[U].push_back(V); G[V].push_back(U); D[U]+=1; D[V]+=1; } ll ans=0; for(int i=0;i