#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, l, s = 0, a, c = 0, co = 0, b[100200], k = 0, n;
  cin >> n;
  for (i = 0; i < (n - 1) * 2; i++) cin >> b[i];
  sort(b, b + (n - 1) * 2);
  for (i = 0; i < (n - 1) * 2; i++) {
    k = 0;
    for (j = 0; j < (n - 1) * 2; j++) {
      if (b[i] == b[j] && i != j) {
        k = 1;
        break;
      }
    }
    if (k == 0) {
      c++;
    }
  }
  cout << c;
}
