program aa;
type son=record
s,co:char;
fa,sp:integer;
end;
var
a:array[1..10000]of char;
s:array[1..10000]of char;
loop,loop1,ans,lon,sp,ans2:integer;
t:text;
procedure change(x:integer);
begin
case a[x] of
'0':begin sp:=sp+1;s[sp]:='0';end;
'1':begin change(x+1);sp:=sp+1;s[sp]:='1'; end;
'2':begin change(x+1);change(x+sp-1);sp:=sp+1;s[sp]:='2';end;
end;
end;
begin
assign(t,'trot.in');
reset(t);
loop:=0;
while not eof(t) do
begin
loop:=loop+1;
read(t,a[loop]) ;
end;
sp:=0;
close(t);
lon:=loop;
for loop:=1 to lon do
begin
if a[loop]='2' then
begin
ans:=ans+1;
ans2:=ans2+1;
end;
if a[loop]='1' then
ans2:=ans2+1;
end;
assign(t,'trot.out');
rewrite(t);
writeln(t,ans2,ans);
close(t);
end.