import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    System.out.println(a/100+a/10%10+a%10);
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    System.out.println(a/100+a/10%10+a%10);
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    System.out.println(a/100+a/10%10+a%10);
  } main {
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    System.out.println(a/100+a/10%10+a%10);
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc System.out.println(a/100+a/10%10+a%10) System.out.println System.out System System.out a/100+a/10%10+a%10 a/100+a/10%10+a%10 a/100 a 100 a/10%10 a/10 a 10 10 a%10 a 10 String[] args args
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    System.out.println(a/100+a/10%10+a%10);
  }
}