#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
vector<int> maps[1200];
int l, r;
int v[1200];
int ans = 0;
void dfs(int x, int pre) {
  if (v[x]) return;
  v[x] = 1;
  int bj = 0;
  for (int i = 0; i < maps[x].size(); i++) {
    if (v[maps[x][i]]) continue;
    bj = 1;
    dfs(maps[x][i], x);
  }
  if (pre == -1 && maps[x].size() == 1)
    ans += 1;
  else if (bj == 0) {
    ans += 1;
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> l >> r;
    maps[l].push_back(r);
    maps[r].push_back(l);
  }
  for (int i = 1; i <= n; i++)
    if (!v[i]) dfs(i, -1);
  cout << ans;
  return 0;
}
