#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    string s;
    while(getline(cin,s))
    {
        int index=s.find_last_of(' ');
        string res=s.substr(index+1);
        cout<<res.size()<<endl;
    }
    return 0;
}