#include <iostream>

using namespace std;

int search(int arr[], int n, int br) {
    int times = 0;
    for (int i = 0; i < n; i++) {
        if (arr[i] == br) times += 1;
    }

    return times;
}

int main() {

    int n;
    cin >> n;

    int p = n - (n % 2);
    int arr[p * 2] = {};

    int k = n % 2;
    int dr[k][2] = {};

    int brojac = 0;
    for (int i = 0; i < n - 1; i++) {
        int x, y;
        cin >> x >> y;

        if (i % 2 == 0) {
            arr[brojac] = x;
            brojac += 1;
            arr[brojac] = y;
            brojac += 1;
        }
    }

    int ard[brojac] = {};
    int novi = 0;

    int koraci = 1;
    for (int i = 0; i < brojac; i++) {
        if (search(arr, brojac, arr[i]) > 1 && search(ard, brojac, arr[i]) < 1) {
            ard[novi] = arr[i];
            novi += 1;
            koraci += 1;
        }
    }

    cout << koraci;
    return 0;
}