program bai_tap;
uses crt;
var a,b,c,d,e,f,g,s,dem :byte;
tb:real;
begin
clrscr;
{cau a}
write('nhap lan luot so hanh khach moi toa: ');
readln(a,b,c,d,e,f,g);
{cau b}
s:=a+b+c+d+e+f+g;
writeln('tong so hanh khach la: ',s);
{cau c}
tb:=s / 7;
dem:=0;
if (a < tb) then inc(dem);
if (b < tb) then inc(dem);
if (c < tb) then inc(dem);
if (d < tb) then inc(dem);
if (e < tb) then inc(dem);
if (f < tb) then inc(dem);
if (g < tb) then inc(dem);
writeln('co ',dem,' toa co hanh khach it hon so luong hanh khach tb');
readln;
end.