In an examination, a student has to secure 40% marks to pass. Rahul gets 178 marks and fails by 32 marks. What are the maximum marks? Please explain in step-by-step procedure.