import java.util.*;

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

public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String line = sc.nextLine();
      	String[] num = line.split("");
      	
      	int count = 0;
      	if(num[0].equals("1")){
        	count++;
        }
      	if(num[1].equals("1")){
        	count++;
        }
      	if(num[2].equals("1")){
        	count++;
        }
      System.out.println(count);
    }
}