var
s : string;
i : integer;
f : boolean;
begin
readln (s);
writeln ('Тут ', length (s), ' символов');
f := true;
for i := 1 to length (s) div 2 do
if s[i] <> s[length (s) - i + 1] then f := false;
writeln ('Это слово является перевертышем: ', f); //True/False
end.
var
s : string;
i, k, count : integer;
c : char;
begin
readln (s);
count := 0;
for i := 1 to length (s) do
if s[i] <> ' ' then
begin
c := s[i];
k := i + 1;
break;
end;
for i := k to length (s) do
if (s[i] = ' ') and (c <> ' ') then
begin
if s[i - 1] = c then inc (count);
c := ' ';
end
else if c = ' ' then c := s[i];
if (c <> ' ' ) and (s[length (s)] <> ' ') and (c = s[length (s)]) then inc (count);
writeln (count);
end.