#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  map<int, vector<int>> arr;
  cin >> n;
  int k, j, count = 0;
  for (int i = 0; i < n - 1; i++) {
    cin >> k >> j;
    if (arr.find(k) != arr.end() && arr[k].size() == 1) {
      count++;
    }
    if (arr.find(j) != arr.end() && arr[j].size() == 1) {
      count++;
    }
    arr[j].push_back(k);
    arr[k].push_back(j);
  }
  cout << n - count;
}
