import java.io.*;

public class InputLoops {
  
  public static void main(String[] args) throws IOException {
    BufferedReader br=
      new BufferedReader(new InputStreamReader(System.in));
    String input= br.readLine();
    
    // while input is not the stopping input
    while (!input.equals("quit!")) {
      System.out.println(input.length());
     input= br.readLine(); 
    }
    
  }
}
                                          