Pagini recente » Cod sursa (job #2610956) | Cod sursa (job #379130) | Cod sursa (job #2325620) | Cod sursa (job #377859) | Cod sursa (job #1591293)
Program text1;
Var fi,fo:text;
s:ansistring;
i,k,m:integer;
Begin
assign(fi,'text.in');
assign(fo,'text.out');
reset(fi);
s:=' ';
while not(eof(fi)) do read(fi,s);
close(fi);
rewrite(fo);
for i:=1 to length(s) do begin
if (s[i]>='A')and(s[i]<='Z') then inc(k);
if (s[i]>='a')and(s[i]<='z') then inc(k);
if (s[i]='-')or(s[i]=' ') then inc(m);
end;
if (s[1]='-')and(s[2]=' ') then dec(m,2);
if (s[1]=' ')and(s[2]='-') then dec(m,2);
Write(fo,k div(m+1) );
close(fo);
end.