func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   int deg[1001];   int main() {     cin >> n;     for (int i = 0; i < n - 1; i++) {       int a, b;       cin >> a >> b;       deg[a]++;       deg[b]++;     }     int ans = 0;     for (int i = 1; i <= n; i++)       if (deg[i] == 1) ans++;     cout << ans << endl;     return 0;   }   