var
        ans, i, n : longint;
	s : string;
procedure compare(qn : longint);
var
  	i : longint;
	st, sq : string;
begin
	for i := 1 to qn do
		st := st + s[i];
	for i := qn + 1 to n do
		sq := sq + s[i];
	if (st <= sq) then 
	begin
		inc(ans);
	end;
end;
begin
	reset(input, 'number.in');
	rewrite(output, 'number.out');
	readln(s);
	ans := 0;
	if s[1] = '0' then
	begin
		writeln('0');
		close(output);
		halt(0);
	end;	
	n := length(s);
	for i := 1 to length(s) - 1 do
	begin
		if (s[i + 1] = '0') then continue;
	        if (i < n - i) then inc(ans) 
			       else if (i > n - i) then break
			                           else compare(i);
	end;
	writeln(ans);
end.
							 