import java.util.*;

public class Main{
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  }
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  } main {
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int ret = 0; ret 0 for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
        if(s.charAt(i) == '1') ret++;
      } {
        if(s.charAt(i) == '1') ret++;
      } if(s.charAt(i) == '1') ret++; s.charAt(i) == '1' s.charAt(i) s.charAt s i '1' ret++ ret System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main{
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  }
} public class Main{
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String s = sc.nextLine();
      int ret = 0;
	  for(int i=0; i<3; i++){
        if(s.charAt(i) == '1') ret++;
      }
    System.out.println(ret);
  }
}