func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   std::vector<int> G[100005];   int color[100005];   void DFS(int s, int co) {     color[s] = co;     for (int i = 0; i < G[s].size(); i++) {       int to = G[s][i];       if (color[to] == 0) {         DFS(to, -1 * co);       }     }   }   int main(int argc, char const *argv[]) {     scanf( %d , &n);     for (int i = 0; i < n - 1; i++) {       int u, v;       scanf( %d%d , &u, &v);       G[u].push_back(v);       G[v].push_back(u);     }     int s1 = 0;     long long ans = 0;     DFS(1, 1);     for (int i = 1; i <= n; i++)       if (color[i] == -1) s1++;     printf( %lld n , 1LL * (n - s1) * s1 - 1LL * n + 1LL);     return 0;   }   