func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> G[((int)2e5 + 10)];   int dis[((int)2e5 + 10)];   int n;   int ans = 0;   void dfs(int f, int son, int d) {     int flag = 0;     dis[son] = d;     for (int i = 0; i < G[son].size(); i++) {       if (G[son][i] == f) continue;       dfs(son, G[son][i], d + 1);       if (dis[G[son][i]] > 2) {         flag = 1;         dis[G[son][i]] = 2;         dis[son] = 1;         dis[f] = 2;       }     }     ans += flag;   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n - 1; i++) {       int x, y;       scanf( %d %d , &x, &y);       G[x].push_back(y);       G[y].push_back(x);     }     dfs(-1, 1, 0);     cout << ans <<   n ;   }   