#define _USE_MATH_DEFINES #include using namespace std; //template #define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define ALL(v) (v).begin(),(v).end() using ll=long long int; const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12; templateinline bool chmax(T& a,T b){if(ainline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} vector g[101010]; int dp[101010][2]; void dfs(int v,int p){ for(auto& to:g[v])if(to!=p){ dfs(to,v); dp[v][0]+=dp[to][1]; dp[v][1]+=min(dp[to][0],dp[to][1]); } dp[v][1]++; } int main(){ int n; cin>>n; rep(_,0,n-1){ int x,y; cin>>x>>y; x--; y--; g[x].push_back(y); g[y].push_back(x); } dfs(0,-1); cout<