program loopcount
integer::i1,i2,i3,i4,n1,n2,n3,n4,t,bt


n1=3
n2=4
n3=5 
n4=6
bt=n1*n2*n3*n4
write (0,*) 'big total',bt
do i1=1,n1
do i2=1,n2
do i3=1,n3
do i4=1,n4
write(0,*) (i1-1)*n2*n3*n4+(i2-1)*n3*n4+(i3-1)*n4+ i4
end do;end do;end do; end do
end
