import java.util.Scanner;

class Main{
  public static void main(String[]args){
    Scanner scanner = new Scanner(System.in);

    String[] string_array = scanner.next().split("");

    System.out.println(Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]));
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[]args){
    Scanner scanner = new Scanner(System.in);

    String[] string_array = scanner.next().split("");

    System.out.println(Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]));
  }
} Main public static void main(String[]args){
    Scanner scanner = new Scanner(System.in);

    String[] string_array = scanner.next().split("");

    System.out.println(Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]));
  } main {
    Scanner scanner = new Scanner(System.in);

    String[] string_array = scanner.next().split("");

    System.out.println(Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]));
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] string_array = scanner.next().split(""); string_array scanner.next().split("") scanner.next().split scanner.next() scanner.next scanner "" System.out.println(Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2])) System.out.println System.out System System.out Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]) Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]) Integer.parseInt(string_array[0]) Integer.parseInt Integer string_array[0] string_array 0 Integer.parseInt(string_array[1]) Integer.parseInt Integer string_array[1] string_array 1 Integer.parseInt(string_array[2]) Integer.parseInt Integer string_array[2] string_array 2 String[]args args
import java.util.Scanner;

class Main{
  public static void main(String[]args){
    Scanner scanner = new Scanner(System.in);

    String[] string_array = scanner.next().split("");

    System.out.println(Integer.parseInt(string_array[0])+Integer.parseInt(string_array[1])+Integer.parseInt(string_array[2]));
  }
}