Sam scored 30% marks but failed by 5 marks. If the required passing percentage was 40%, what was the maximum marks of the test conducted?