123
program Program1;
var
textfromfile: text;
buf, s: string;
i, j, w, min, count: integer;
l: char;
begin
assign(textfromfile, '1.txt');
reset(textfromfile);
repeat
readln(textfromfile,buf);
s := s + buf + #32
until EoF(textfromfile);
i := length(s);
writeln(s);
writeln(i);
w := 0;
min := 255;
for i:=1 to length(s) do
if (s[i] >= 'a') and (s[i] <= 'z') then
w := w + 1
else begin
if (w < min) and (w <> 0) then
min := w;
w := 0
end;
writeln('Count: ', min);
end.