Total Probability (2)

In a multiple choice question Exam, a student either knows the answer or he guesses. There are m options available in each question. If he guesses the answer, he is correct with 1/m probability.

Suppose p is the probability that he knows the answer and 1-p is the probability he doesn't know.

What is the probability that he has given answer correctly?