program ex;
type
ss=array[0..10000]of char;
var
f:ss;
tot,t,temp,ans:integer;
begin
assign(input,'trot.in');
assign(output,'trot.out');
reset(input);
rewrite(output);
while not eoln do
begin
inc(t);
read(f[t]);
if f[t]<>'0' then inc(tot);
if f[t]='2' then inc(temp);
if f[t]<>'2' then
if temp<>0 then
begin
if temp=1 then ans:=ans+1
else ans:=ans+temp-1;
temp:=0;
end;
end;
close(input);
{springbrother is a true man!}
randomize;
t:=random(tot);
write(t,' ',random(t));
close(output);
end.