#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=(mod+1)/2;
const double EPS=1e-6;
const double PI=acos(-1.0);
int ABS(int a){return max(a,-a);}
long long ABS(long long a){return max(a,-a);}
vector<int>g[110000];
int dfs(int a,int b){
	int ret=0;
	int z=0;
	for(int i=0;i<g[a].size();i++){
		if(b==g[a][i])continue;
		int tmp=dfs(g[a][i],a);
		if(tmp==0)z++;
		ret+=tmp;
	}
	if(z>1)ret+=z-1;
	return ret;
}
vector<int>V;
int main(){
	int a;scanf("%d",&a);
	for(int i=0;i<a-1;i++){
		int p,q;scanf("%d%d",&p,&q);
		g[p].push_back(q);g[q].push_back(p);
	}
	for(int i=0;i<a;i++)if(g[i].size()==1)V.push_back(i);
	int ret=mod;
for(int i=0;i<10;i++){
	ret=min(ret,dfs(V[rand()%V.size()],-1));
}
	ret++;
	printf("%d\n",ret);
}