import java.util.Scanner;

public class Main {

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

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	}
	
} import java.util.Scanner; Scanner java.util public class Main {

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

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	}
	
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	} main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String onlyOne = line.replaceAll("0", ""); onlyOne line.replaceAll("0", "") line.replaceAll line "0" "" System.out.println(onlyOne.length()) System.out.println System.out System System.out onlyOne.length() onlyOne.length onlyOne sc.close() sc.close sc String[] args args public class Main {

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

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	}
	
} public class Main {

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

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	}
	
} Main
import java.util.Scanner;

public class Main {

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

        String onlyOne = line.replaceAll("0", "");
        System.out.println(onlyOne.length());
        
        sc.close();
	}
	
}