Maximize expected return making a practice exam I had to make the following problem which I couldn't solve unfortunately...

Problem
In the springtime, a student has $N$ days to find a summer job for one month. Each day, the student is offered a job with total salary drawn from a exponential distribution with mean $R > 0$. The offers are independent. The costs of applying for jobs is $c < R$; the student pays these costs each time he rejects an offer. The offer on day $N$ is accepted in all cases. He cannot revisit a rejected offer. When should the student accept an offer?

I hope someone can help me..
 A: The last day's offer has expected pay $R$. 
Let's suppose the expected value if you start the $k$th day is $R_k$, so  $R_N=R$.
Therefore the $k-1$th day's offer should be accepted if and only if its offer is greater than $R_k-c$, since you could instead choose to pay $c$ and then take your chance on the $k$th day.
If you start the $k-1$th day, the probability of accepting that day's offer is $\exp\left(-\frac{R_k-c}{R}\right)$ and conditioned on accepting it then (using memorylessness) the expected pay is $R+R_k-c$. So the expected position if you reach the $k-1$th day is  $R_{k-1}=(R+R_k-c)\exp\left(-\frac{R_k-c}{R}\right) + (R_k-c)\left(1-\exp\left(-\frac{R_k-c}{R}\right)\right)$, i.e. $R_{k-1}= R\exp\left(-\frac{R_k-c}{R}\right) +R_k -c$.
A: we know that  exponential distribution has  following form
    exponential
now if student reject  offers he  paid  $c$ right?so if he  rejected $x$ times,it means cost $x*c$ is it right?so our problem is that we  have to determine number of days he should reject so that  cost $x*c$  should be minimum as well  as salary must be maxsimum,so i think we have to find  number of $x$ so that cost must be minimum and  salary maximum,we may use Lagrangian multiplier or another method ,
