import java.util.*;
public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


	}
} Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


	} main {
      Scanner sc = new Scanner(System.in);

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


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

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


	}
} public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);

      String s = sc.next();
      char[] ch = s.toCharArray();
      
      int cnt = 0;
      if(ch[0] == '1') {
        cnt++;
      }
      if(ch[1] == '1') {
        cnt++;
      }
      if(ch[2] == '1') {
        cnt++;
      }
      
      System.out.println(cnt);
      
      


	}
}