Hermaan scored 40 marks in a test, getting 4 marks for each right answer and losing 1 mark for each wrong answer. If the number of questions he answered wrongly is 1 less than the number of questions he answered correctly, then find the number of questions he answered correctly.