import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  } main {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String[] arr = a.split(""); arr a.split("") a.split a "" int s = 0; s 0 if(arr[0].equals("1")){ ++s; } arr[0].equals("1") arr[0].equals arr[0] arr 0 "1" { ++s; } ++s s if(arr[1].equals("1")){ ++s; } arr[1].equals("1") arr[1].equals arr[1] arr 1 "1" { ++s; } ++s s if(arr[2].equals("1")){ ++s; } arr[2].equals("1") arr[2].equals arr[2] arr 2 "1" { ++s; } ++s s System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String[] arr = a.split("");
    int s = 0;
    if(arr[0].equals("1")){ ++s; }
    if(arr[1].equals("1")){ ++s; }
    if(arr[2].equals("1")){ ++s; }
    System.out.println(s);
  }
}