import java.util.Scanner;
public class Main{
    public static void lastLength(String str){
        if(!str.isEmpty()){
            String[] a = str.split(" ");
            String s = a[a.length-1];
            int length = s.length();
            System.out.println(length);
        }
    }

    public static void main(String[] args){
       Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()){
            String input = sc.nextLine();
            lastLength(input);
        }
    }
}