The first Byurakan spectral sky survey. Investigations of stars of late M and C spectral classes