let str_list str = 
	let len = String.length str in
	let rec sub i result = 
		if i < len then sub (i + 1) ((String.sub str i 1) :: result)
		else result
	in sub 0 []
	
let check_answer lst = 
	let rec sub ls i = 
		match ls with
			[] -> i
			| first :: rest	-> if first = "1" then sub rest (i + 1)
							else sub rest i
	in sub lst 0						

let solve () = 
	let target = read_line() in
	let target_lst = str_list target in 
	print_int (check_answer target_lst);;



solve();;