function [] = Product(n)

X = zeros([n,1]);
M = zeros([n,1]);
T = zeros([n,1]);

M(1) = 1;

for i = 1:n-1
   
    
    r = rand;
    if r < 6/7
        X(i+1) = 1/2;
    else
        X(i+1) = 4;
    end
    
    M(i+1) = M(i)*X(i+1);
    T(i+1) = T(i) + 1;
    
end

figure
plot(T,M)
legend('M_n')

