program trot;
var
a:array[1..10009]of integer;
a1:array[1..10000]of longint;
a2:array[1..10000]of longint;
i,j,n,m,l,s0,s1,s2:longint;
s:string;
begin
assign(input,'trot.in');
assign(output,'trot.out');
reset(input); rewrite(output);
readln(s);
l:=length(s);
fillchar(a,sizeof(a),0);
fillchar(a1,sizeof(a1),0);
fillchar(a2,sizeof(a2),0);
s0:=0;s1:=0;s2:=0;
for i:=1 to l do a[i]:=ord(s[i])-48;
m:=0; n:=0;
a[i+1]:=0;
for i:=1 to l do begin
if a[i]+a[i+1]=3 then
else if a[i]<>0 then inc(m);
end;
for i:=1 to l do if a[i]+a[i+1]=4 then else if (a[i]<>0)and(a[i]<>1) then inc(n);
write(m,' '); write(n);
close(input);close(output);
end.