#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;

int main() {
    // getline()读取整行,便于字符串流分割
    string line;
    getline(cin, line);

    // 用istringstream创建输入字符串流对象
    vector<string> words;
    string word;
    istringstream iss(line);

    // 字符串分割成单词
    while (iss >> word) {
        words.push_back(word);
    }

    string last_word = words.back();
    cout << last_word.size() << endl;

}
// 64 位输出请用 printf("%lld")
  1. getline():用getline()获取一行有空格的字符串。
  2. istringstream:分割字符串用字符串流对象和while循环。
  3. back():从字符数组words中获取最后一个单词用back()。
  4. word.size():最推荐的返回字符串大小的函数。