function Msk = mask5(N)
Msk = zeros(N,N,N,N,N);

for k5=1:N
    
    Msk(1:k5-1,1:k5-1,1:k5-1,1:k5-1,k5) = 5*reshape(mask4(k5-1),k5-1,k5-1,k5-1,k5-1,1);
    
    Msk(1:k5-1,1:k5-1,1:k5-1,k5,k5) = 10*reshape(mask3(k5-1),k5-1,k5-1,k5-1,1,1);
    
    Msk(1:k5-1,1:k5-1,k5,k5,k5) = 10*reshape(mask2(k5-1),k5-1,k5-1,1,1,1);
    
    Msk(1:k5-1,k5,k5,k5,k5) = 5;
    
    Msk(k5,k5,k5,k5,k5) = 1;
end;   