const
n = 10;
var
i, k, s: integer;
a10: array[1..n] of integer;
begin
for i := 1 to n do
read(a10[i]);
s := 0;
k := 0;
if a10[i] < 5 then
s := s + a10[i];
k := k + 1;
end;
write(s, ' ', k);
end.
const
n = 10;
var
i, k, s: integer;
a10: array[1..n] of integer;
begin
for i := 1 to n do
read(a10[i]);
s := 0;
k := 0;
for i := 1 to n do
if a10[i] < 5 then
begin
s := s + a10[i];
k := k + 1;
end;
write(s, ' ', k);
end.