var
T : array [1..10] of integer;
C : array [1..10] of real; {если цена не дробная то можно C : array [1..10] of integer; и a:integer;}
i : integer; a : real;
begin
a:=0;
for i := 1 to 10 do
begin
readln(T);
readln(C);
end;
for i := 1 to 10 do
a := T*c + a;
writeln;
writeln(a);
en