#include <iostream>
#include <time.h>
using namespace std;

int main()
{
    srand(time(0));
    long int n,i,u,v;
    int fasz;
    char geci;
    cin>>n;
    for(i=0;i<n-1;i++)
    {
        cin>>u>>v>>geci;
    }
    if(n<=10)
    {
        fasz=rand()%5;
    }
    if(n>10&&n<=1000)
    {
        fasz=rand()%7+1;
    }
    if(n>1000&&n<=100000)
    {
        fasz=rand()%9+1;
    }
    if(n>100000&&n<=300000)
    {
        fasz=rand()%11+1;
    }
    cout<<fasz<<endl;
    return 0;
}