import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  } main {
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String wk = sc.next(); wk sc.next() sc.next sc String[] ballArray = wk.split(""); ballArray wk.split("") wk.split wk "" int ballNum = 0; ballNum 0 for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    } int i = 0; int i = 0; i 0 i < ballArray.length i ballArray.length ballArray ballArray.length i++ i++ i {
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    } {
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    } if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      } ballArray[i].equals("1") ballArray[i].equals ballArray[i] ballArray i "1" {
        ballNum = ballNum + 1;
      } ballNum = ballNum + 1 ballNum ballNum + 1 ballNum 1 System.out.println(ballNum) System.out.println System.out System System.out ballNum String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String wk = sc.next();
    String[] ballArray = wk.split("");
    int ballNum = 0;
    for (int i = 0;i < ballArray.length;i++){
      if (ballArray[i].equals("1")) {
        ballNum = ballNum + 1;
      }
    }
	System.out.println(ballNum);
  }
}