#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int* arr = new int[n];
  for (int j = 0; j < n; j++) {
    arr[j] = 0;
  }
  int temp = n;
  n--;
  while (n--) {
    int a, b;
    cin >> a >> b;
    if (arr[a - 1] == 0) {
      arr[a - 1] = -1;
    } else if (arr[a - 1] == -1) {
      arr[a - 1] = -2;
    }
    if (arr[b - 1] == 0) {
      arr[b - 1] = -1;
    } else if (arr[b - 1] == -1) {
      arr[b - 1] = -2;
    }
  }
  int sum = 0;
  for (int j = 0; j < temp; j++) {
    if (arr[j] == -1) {
      sum++;
    }
  }
  cout << sum;
  return 0;
}
