program cyb_55;
uses
Crt;
const
des: set of char = [' ',',','.',';',':','?','!'];
var
s: string;
i, q: byte;
begin
ClrScr;
writeln('Vvedite tekst: ');
readln(s);
q:= 0;
if s[1] = 'b' then
inc(q);
for i:= 2 to Length(s) do
if (s[i] = 'b') and (s[i-1] in des) then
inc(q);
writeln('Kol-vo slov, nachinaiyshixsia na bykvy ''b'': ', q);
readln;
end.