Pagini recente » Cod sursa (job #3141953) | Cod sursa (job #1810062) | Cod sursa (job #179805) | Cod sursa (job #32612) | Cod sursa (job #743061)
Cod sursa(job #743061)
var i,j,k,l,m,n:longint; c,c1:char; f1,f2:text;
begin
assign(f1,'text.in');
reset(f1);
assign(f2,'text.out');
rewrite(f2);
k:=1;
l:=0;
repeat
read(f1,c);
if (c in ['a'..'z']) or (c in ['A'..'Z']) then Inc(l)
else if (Not(c in ['a'..'z']) or Not(c in ['A'..'Z'])) and ((c1 in ['a'..'z']) or (c1 in ['A'..'Z'])) then Inc(k);
c1:=c;
until eoln(f1);
l:=l+1;
if Not(c in ['A'..'Z']) and Not(c in ['a'..'z']) then Dec(k);
writeln(f2,l div k);
close(f1);
close(f2);
end.