Which is the most distant: a M main-sequence star or an M giant star?