I have the following script and my problem is that if I set n<-10000 works ok, but if I increase the number of iterations to 100.000 or even 1.000.000 I get
n<-10000