import java.util.*;
public class Main {
  public static void main(String[] args){
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    }
} Main public static void main(String[] args){
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    } main {
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    } int counter=0; counter 0 Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String str=sc.next(); str sc.next() sc.next sc char[] s=str.toCharArray(); s str.toCharArray() str.toCharArray str if(s[0]=='1') counter++; s[0]=='1' s[0] s 0 '1' counter++ counter if(s[1]=='1') counter++; s[1]=='1' s[1] s 1 '1' counter++ counter if(s[2]=='1') counter++; s[2]=='1' s[2] s 2 '1' counter++ counter System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main {
  public static void main(String[] args){
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    }
} public class Main {
  public static void main(String[] args){
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    int counter=0;
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    char[] s=str.toCharArray();
    if(s[0]=='1') counter++;
    if(s[1]=='1') counter++;
    if(s[2]=='1') counter++;
    System.out.println(counter);
    }
}