#include <iostream>
#include <iomanip>
 
using namespace std;
int main() {
    double s;
    int p, d;
    int dM[12] = {31, 28, 31, 30 ,31, 30, 31, 31, 30, 31, 30, 31};
    cin>>s>>p>>d;
    int day, month;
    char a;
    cin>>day>>a>>month;
    month--;
    int dP = 0;
    for(int i = month; dP < d; i++){
        double z = 0;
        for(int j = (i==month?day : 1); j <= dM[i] && dP < d; j++){
            dP++;
            z +=  s*(p/100.0)*(1/365.0);
        }
        s += z;
    }
    cout<<fixed<<setprecision(6)<<s;
    return 0;
}