Program pr;
uses crt;
Var k,a,sum:integer;
Begin
Writeln('Vvedite posledovatelnost');
k:=0;
readln(a);
sum:=a;
While a<>0 do
Begin
readln(a);
sum:=sum+a;
if (a mod 2=0) and (a mod 3=0) then k:=k+1;
end;
Writeln('k=',k);
Writeln('sum=',sum);
readln;
end.