INTEGER nipass,ipass
nipass=3
IF ( nipass.GT.maxcube ) THEN
nipass=2
DO ipass=1,nipass
IF (nipass .GT. maxpass) THEN
& nipass, maxpass
& + nipass*act1
& + nipass*max1*act2
& + nipass*max1*max2*act3
& + nipass*max1*max2*max3*act4