func_code_string: #include <bits/stdc++.h>   using namespace std;   long long dp[3][111111];   vector<int> graph[111111];   int main() {     ios_base::sync_with_stdio(false);     int n;     cin >> n;     for (int i = 0; i < n - 1; i++) {       int a, b;       cin >> a >> b;       a--;       b--;       graph[a].push_back(b);       graph[b].push_back(a);     }     for (int i = 0; i < n; i++) dp[0][i] = 1;     for (int len = 1; len <= 2; len++)       for (int v = 0; v < n; v++) {         for (int u : graph[v]) dp[len][v] += dp[len - 1][u];       }     int sum = 0;     for (int i = 0; i < n; i++) sum += dp[2][i];     sum /= 2;     sum -= n - 1;     cout << sum <<   n ;   }   