import java.util.Scanner;

public class Main{

  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  }
} import java.util.Scanner; Scanner java.util public class Main{

  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  }
} Main public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  } main {
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  } Scanner s = new Scanner(System.in); s new Scanner(System.in) String str =s.next(); str s.next() s.next s int sum = 0; sum 0 for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    } int i =0; int i =0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    } {
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    } char splitstr = str.charAt(i); splitstr str.charAt(i) str.charAt str i if(splitstr == '1'){
        sum += 1;
      }else{
      } splitstr == '1' splitstr '1' {
        sum += 1;
      } sum += 1 sum 1 {
      } System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main{

  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  }
} public class Main{

  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  }
} Main
import java.util.Scanner;

public class Main{

  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    String str =s.next();
    int sum = 0;

    for(int i =0;i<str.length();i++){
      char splitstr = str.charAt(i);
      if(splitstr == '1'){
        sum += 1;
      }else{
      }


    }
System.out.println(sum);




  }
}
