2865 FOR K=1 TO NV-1