function res=asian(N);
dim=5;
n= 10^floor(log(N)/log(10));
if n>1e6 
  n = 1e6
end
N=floor(N/n);

R= zeros(N,1);

for j= [1:N]
  W= randn(n,dim);

  S= zeros(n,1);
  S(:) = 1.0;

  A=zeros(n,1);

  for i= [2:dim+1]
    S(:)= S(:) .*exp(2/5*W(:,i-1)-3/50);
    A=A+S(:);
  end;

  A= exp(-1/10)*max(0.0, A/dim-1.0);
  %A= exp(-1/10)*A.^1;
  %A= exp(-1/10)*A.^2;
  %A= exp(-1/10)*A.^3;

  R(j)= mean(A);
end

res=mean(R);
%res=abs(mean(R)-4.805);
%res=abs(mean(R)-37.209);
%res=abs(mean(R)-955.14);