#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,i;
    cin >> n;
    int aa,bb,d;
    d = 0;
    int a[n+1];
    for(i = 0; i < n+1;i++){
        a[i] = 0;
    }
    for(i = 0; i < n-1;i++){
        cin >> aa;
        cin >> bb;
        a[aa] = a[aa] + 1;
        a[bb] = a[bb] + 1;
    }

    for(i = 1; i < n+1;i++){
        if(a[i] > 1) d = d + a[i];
    }
    int k;

    k = (n+1) - d;
    cout << k << endl;
    return 0;
}