In an examination, 40% of the candidates wrote their answer in Hindi and the others in English. The average marks of the candidates written in Hindi is 74 and the average marks of the candidates written in English is 77. What is the average marks of all the candidates?