Hey all, Can anybody point out of this question I am really confused so please help me

Suppose we have to generate a sample size of n=1000 values from the distribution of f(x)=(a+1)X^a where (0<x<1) by using the method of inverse transform sampling. The question is I have to repeat this sample 100 times and for each one the maximum likelihood estimate of (a) must be calculated. can anyone tell me how I do it?? I need it By using R.

Thanks in advance.