In an examination, the pass mark is 40%. If a candidate gets 65 marks and fails by 3 marks; find the maximum marks.