Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIUFF - Financial Freedom

Mr. Tan aims to earn X VND before retiring. Upon retirement, he plans to put the entire X VND into a safe investment with a stable monthly return of r%. At the end of the first month, he plans to withdraw Y VND for expenses. Due to the impact of inflation with an monthly rate of f%, in the following months, he will withdraw an amount of money that ensures a standard of living equivalent to the Y VND from the first month of retirement. Mr. Tan wants to ensure that he has enough money to spend for at least N months (i.e. Mr. Tan withdraws N-1 times).

Input

The only line contain 2 real numbers r and f, and 2 integers Y and N

Output

Calculate X (rounded to 4 decimal places)

Sample

Input

Output

0.6 0.25 20 400

 

4291.8397


Added by:Ha Minh Ngoc
Date:2023-04-02
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.