import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc System.out.println(3 - s.replaceAll("1","").length()) System.out.println System.out System System.out 3 - s.replaceAll("1","").length() 3 s.replaceAll("1","").length() s.replaceAll("1","").length s.replaceAll("1","") s.replaceAll s "1" "" String args[] args public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	}
} Main
import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(3 - s.replaceAll("1","").length());
	}
}
