Pagini recente » Cod sursa (job #501270) | Cod sursa (job #1975835) | Cod sursa (job #2570230) | Cod sursa (job #1322763) | Cod sursa (job #584606)
Cod sursa(job #584606)
var c:char;
g,s,u:longint;
begin
assign(input,'text.in');reset(input);
assign(output,'text.out');rewrite(output);
g:=0;
s:=0;
u:=0;
while not eoln(input) do begin
read(c);
if (upcase(c) in['A'..'Z']) then inc(g) else begin
if g<>0 then begin
s:=s+g;
inc(u);
g:=0;
end;
end;
end;
if g<>0 then begin
inc(u);
s:=s+g;
g:=0;
end;
write(s div u);
close(output);
end.