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