#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cctype>
#include <vector>
#include <cstdlib>
#define R register
#define IN inline
#define W while
#define gc getchar()
#define MX 100500
template <class T>
IN void in(T &x)
{
	x = 0; R char c = gc;
	for (; !isdigit(c); c = gc);
	for (;  isdigit(c); c = gc)
	x = (x << 1) + (x << 3) + c - 48;
}
int n;
std::vector <int> nex[MX];
IN void add(R int from, R int to) {nex[to].push_back(from);}
int dp[MX];
void DFS(R int now, R int fa)
{
	bool fir = false;
	for (auto i : nex[now])
	{
		if (i == fa) continue;
		DFS(i, now);
		dp[now] += dp[i];
		if (!dp[i]) fir ? dp[now]++ : fir = true;
	}
}
int main(void)
{
	in(n); int foo, bar, rt = -1;
	for (R int i = 1; i < n; ++i)
	in(foo), in(bar), add(foo, bar), add(bar, foo);
	for (R int i = 0; i < n; ++i) if (nex[i].size() > 2) {rt = i; break;}
	if (~rt) DFS(rt, -1), printf("%d", dp[rt]);
	else puts("1"); 
}