#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main()
{
ifstream in("sir.in");
char buffer[256];
char *str;
int k=0;int x[50];
int max=0;
while (!in.eof())
{
in.getline(buffer, 256);
str = buffer;
if(max<strlen(str))
max=strlen(str);
}
cout<<max;
}