#include <bits/stdc++.h>

using namespace std;
unsigned long long int a[100000];
unsigned long long int u[100000],v[100000];
int main()
{

    unsigned long long int n;
    cin>>n;

    for(unsigned long long int i=1;i<=n;i++){
        cin>>a[i];
    }

    for(unsigned long long int i=1;i<=n-1;i++){
        cin>>u[i]>>v[i];
    }
    cout<<1;

    return 0;
}