Program prog;
uses crt;
var s: string;
i,k: integer;
begin
clrscr;
write('Введите S = ');
readln(s);
for i:=1 to (length(s)-1) do
if s[i]+ s[i+1]= 'ое' then k:=k+1;
if k>0 then
writeln('Количество сочетаний "ое" k = ',k)
else begin
writeln('Cочетаний нет');
writeln(s+s);
end;
end.