// readline() 获取用例输入
const inputString = readline();
const wordLastLength = (word) => {
if (!word) {
return 0;
}
const wordArr = word.split(' ');
if (wordArr.length === 1) {
return word.length;
}
return wordArr[wordArr.length-1].length;
};
// console.log打印输出结果
console.log(wordLastLength(inputString));



京公网安备 11010502036488号