Var
D: array[1.. 17] of integer;
i, ii, temp, count: integer;
begin
i := 0;
ii := 0;
temp := 0;
count := 0;
randomize;
for i := 1 to 17 do
begin
D[i] := random(41);
write(D[i], ' ');
end;
writeln('');
for i := 1 to 16 do
for ii := 1 to 17 - i do
if D[ii] > D[ii + 1] then
begin
temp := D[ii + 1];
D[ii + 1] := D[ii];
D[ii] := temp;
end;
for i := 1 to 17 do
write(D[i], ' ');
writeln('');
for i := 1 to 17 do
if D[i] > 15 then
count := count + 1;
writeln(count);
end.