The problem tells you all the information you need.

What parameters to put, what return type if any is required, what type of data type you will be working with and even the formula you need.
...