#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
int N;
int Map[102][102];
int Estimate[102];
int main()
{
int I,J,K;
char Temp;
while(EOF
!=scanf("%d",&N
)) {
/*Input*/
for (I=2; I<=N; I++)
{
for (J=1; J<I-1; J++)
{
if (Temp!='x')
{
}
else
{
Map[I][J]=99999999;
continue;
}
Map[I][J]=K;
Map[J][I]=K;
}
if (Temp!='x')
{
}
else
{
Map[I][J]=99999999;
continue;
}
Map[I][J]=K;
Map[J][I]=K;
}
/*BellmanFord algorithm*/
for (I=2;I<=N;I++)
{
Estimate[I]=99999999;
}
for (I=1;I<=N-1;I++)
{
for (J=1;J<=N;J++)
{
for (K=1;K<=N;K++)
{
if (Map[J][K]>0)
{
if (Estimate[K]>Estimate[J]+Map[J][K])
{
Estimate[K]=Estimate[J]+Map[J][K];
}
}
}
}
}
/*find the longest path from source*/
for (I=2,K=Estimate[1];I<=N;I++)
{
if (K<Estimate[I])
{
K=Estimate[I];
}
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgojaW5jbHVkZSA8bGltaXRzLmg+CgppbnQgTjsKaW50IE1hcFsxMDJdWzEwMl07CmludCBFc3RpbWF0ZVsxMDJdOwoKaW50IG1haW4oKQp7CiAgICBpbnQgSSxKLEs7CiAgICBjaGFyIFRlbXA7CiAgICB3aGlsZShFT0YhPXNjYW5mKCIlZCIsJk4pKQogICAgewogICAgICAgIC8qSW5wdXQqLwogICAgICAgIG1lbXNldChNYXAsMCw0KjEwMioxMDIpOwogICAgICAgIGZvciAoST0yOyBJPD1OOyBJKyspCiAgICAgICAgewogICAgICAgICAgICBmb3IgKEo9MTsgSjxJLTE7IEorKykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgc2NhbmYoIiVjIiwmVGVtcCk7CiAgICAgICAgICAgICAgICBpZiAoVGVtcCE9J3gnKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHVuZ2V0YyhUZW1wLHN0ZGluKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBNYXBbSV1bSl09OTk5OTk5OTk7CiAgICAgICAgICAgICAgICAgICAgZ2V0Y2hhcigpOwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc2NhbmYoIiVkICIsJkspOwogICAgICAgICAgICAgICAgTWFwW0ldW0pdPUs7CiAgICAgICAgICAgICAgICBNYXBbSl1bSV09SzsKICAgICAgICAgICAgfQogICAgICAgICAgICBzY2FuZigiJWMiLCZUZW1wKTsKICAgICAgICAgICAgaWYgKFRlbXAhPSd4JykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgdW5nZXRjKFRlbXAsc3RkaW4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgTWFwW0ldW0pdPTk5OTk5OTk5OwogICAgICAgICAgICAgICAgZ2V0Y2hhcigpOwogICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc2NhbmYoIiVkIiwmSyk7CiAgICAgICAgICAgIE1hcFtJXVtKXT1LOwogICAgICAgICAgICBNYXBbSl1bSV09SzsKICAgICAgICB9CgogICAgICAgIC8qQmVsbG1hbkZvcmQgYWxnb3JpdGhtKi8KICAgICAgICBmb3IgKEk9MjtJPD1OO0krKykKICAgICAgICB7CiAgICAgICAgICAgIEVzdGltYXRlW0ldPTk5OTk5OTk5OwogICAgICAgIH0KICAgICAgICBmb3IgKEk9MTtJPD1OLTE7SSsrKQogICAgICAgIHsKICAgICAgICAgICAgZm9yIChKPTE7Sjw9TjtKKyspCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGZvciAoSz0xO0s8PU47SysrKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGlmIChNYXBbSl1bS10+MCkKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChFc3RpbWF0ZVtLXT5Fc3RpbWF0ZVtKXStNYXBbSl1bS10pCiAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVzdGltYXRlW0tdPUVzdGltYXRlW0pdK01hcFtKXVtLXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLypmaW5kIHRoZSBsb25nZXN0IHBhdGggZnJvbSBzb3VyY2UqLwogICAgICAgIGZvciAoST0yLEs9RXN0aW1hdGVbMV07STw9TjtJKyspCiAgICAgICAgewogICAgICAgICAgICBpZiAoSzxFc3RpbWF0ZVtJXSkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgSz1Fc3RpbWF0ZVtJXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBwcmludGYoIiVkXG4iLEspOwogICAgfQogICAgcmV0dXJuIDA7Cn0K