func_code_string: #include <bits/stdc++.h>   using namespace std;   inline long long read() {     long long x = 0, f = 0;     char ch = getchar();     for (; ch <  0  || ch >  9 ; ch = getchar()) f ^= (ch ==  - );     for (; ch >=  0  && ch <=  9 ; ch = getchar()) x = x * 10 + ch -  0 ;     return f ? -x : x;   }   const long long maxn = 200050;   long long n, head[maxn], cnt = 0, siz[maxn], dep[maxn];   long long ans = 0, qwq = 0;   struct node {     long long to, nxt;   } e[maxn * 2];   inline void add(long long u, long long v) {     e[++cnt].to = v;     e[cnt].nxt = head[u];     head[u] = cnt;   }   void dfs(long long u, long long f, long long d) {     siz[u] = 1;     dep[u] = d;     for (long long i = head[u]; i; i = e[i].nxt) {       long long v = e[i].to;       if (v == f) continue;       dfs(v, u, d + 1);       siz[u] += siz[v];     }   }   signed main() {     n = read();     for (long long i = 1, a, b; i < n; ++i) {       a = read();       b = read();       add(a, b);       add(b, a);     }     dfs(1, 0, 0);     for (long long i = 1; i <= n; ++i) {       ans += siz[i] * (n - siz[i]);       if (dep[i] & 1) ++qwq;     }     ans += qwq * (n - qwq);     printf( %lld n , ans / 2);     return 0;   }   