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