#include #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() using namespace std; typedef long long int ll; typedef pair P; typedef vector vi; typedef vector vvi; typedef vector vl; typedef vector

vp; #define dame { puts("-1"); return 0;} #define yn {puts("Yes");}else{puts("No");} #define MAX_N 200005 int cnt[MAX_N]; int main() { int n; cin >> n; rep(i,n-1){ int a,b; cin >> a >> b; cnt[a]++; cnt[b]++; } int ans = 0; srep(i,1,n+1)if(cnt[i] == 1)ans++; ans -= 2; cout << ans << endl; return 0; }