M-type main-sequence stars