import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String  s = scan.next();

		s = s.replaceAll("0","");

		System.out.print(s.length());
	}

} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String  s = scan.next();

		s = s.replaceAll("0","");

		System.out.print(s.length());
	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String  s = scan.next();

		s = s.replaceAll("0","");

		System.out.print(s.length());
	} main {

		Scanner scan = new Scanner(System.in);

		String  s = scan.next();

		s = s.replaceAll("0","");

		System.out.print(s.length());
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String  s = scan.next(); s scan.next() scan.next scan s = s.replaceAll("0","") s s.replaceAll("0","") s.replaceAll s "0" "" System.out.print(s.length()) System.out.print System.out System System.out s.length() s.length s String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String  s = scan.next();

		s = s.replaceAll("0","");

		System.out.print(s.length());
	}

}