Uses crt;
const N=10;
var J:array [1..N] of real;
SUM:real;
B:integer;
begin
SUM:=0;
for b:=1 to N do
J[B]:=sin(B)/cos(B);
for B:=1 to N do
writeln(J[B]:5:3);
for B:=2 to N-1 do
if (J[B]>J[B+1]) and (J[B]>J[B-1]) then SUM:=SUM+J[B];
if J[1]>J[2] then SUM:=SUM+J[1];
if J[N]>J[N-1] then SUM:=SUM+J[N];
writeln;
write('SUM=',SUM:5:3);
end.