function R = Rate(L)
n=size(L,1);
R=L(1:1);
for i=2:n
   prod=1;
   for j=1:i-1
      prod=prod*L(j+1,j);
   end
   R=R+L(1,i)*prod;
end
