func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> adj[200010];   long long int ans = 0LL;   int odd = 0, sz[200010] = {};   void dfs(int cur, int par = -1, int ht = 0) {     sz[cur]++;     for (int u : adj[cur]) {       if (u == par) continue;       dfs(u, cur, ht ^ 1);       sz[cur] += sz[u];     }     if (ht) odd++;   }   int main() {     int n;     scanf( %d , &n);     for (int i = 0; i < n - 1; i++) {       int x, y;       scanf( %d %d , &x, &y);       adj[x].push_back(y);       adj[y].push_back(x);     }     dfs(1);     for (int i = 1; i <= n; i++) ans += (1LL) * sz[i] * (n - sz[i]);     ans += (1LL) * odd * (n - odd);     printf( %lld n , ans / 2);     return 0;   }   