// "Collapse loop with stream 'sum()'" "false"

import java.io.BufferedReader;
import java.io.IOException;

public class Main {
  void test(BufferedReader br) throws IOException {
    String line = "";
    long count = 0;
    wh<caret>ile((line = br.readLine()) != null) {
      count+=(line = line.trim()).length();
    }
    System.out.println(count);
  }
}