Var
i,n,k:longint;
a:array [1..30000] of longint;
begin
n:=0;
for i:=1 to 30000 do
begin
read(a[i]);
if a[i]<>0
then n:=n+1
else break;
end;
for i:=1 to n do
begin
k:=0;
while a[i]<>0 do
begin
a[i]:=a[i] div 10;
k:=k+1;
end;
writeln(k,' ');
end;
end.