var a:array[1..100] of real;
n,i:byte;
tong,tich,hieu:real;
begin
n:=8;
for i:=1 to n do readln(a[i]);
tong:=a[1];
tich:=a[1];
hieu:=a[1];
for i:=2 to n do
begin
tong:=tong+a[i];
tich:=tich*a[i];
hieu:=hieu-a[i];
end;
writeln('tong=',tong:2:5);
writeln('tich=',tich:2:5);
writeln('hieu=',hieu:2:5);
readln;
end.