      SUBROUTINE piksrt(n,arr)
	implicit real *8 (a-h,o-z)
      dimension arr(n)
	common /contador/ icont
	icont=0
      do 12 j=2,n
	  icont=icont+1
        a=arr(j)
        do 11 i=j-1,1,-1
		icont=icont+1
          if(arr(i).le.a)goto 10
          arr(i+1)=arr(i)
11      continue
        i=0
10      arr(i+1)=a
12    continue
      return
      END


