The average marks scored by 100 students were calculated as 40. Later, it was discovered that a score of 38 was misread as 83. Find the correct mean.