// editor4
#include <iostream>
#include <iomanip>
using namespace std;
class Loan
{
    public:
    void home(double amt,int y)
    {
        double n=(amt * 5.0)/100.0;
        cout<<fixed<<setprecision(2)<<n*y<<endl;
    }
    void personal(double amt,int y)
    {
        double n=(amt * 10.0)/100.0;
        cout<<fixed<<setprecision(2)<<n*y<<endl;

    }
};
int main()
{
    string s;
    cin>>s;
    double amt;
    int y
    if(!(cin>>amt>>y));
    {
        cout<<"Invalid input";
        return 0;
    }
    if(amt<0 || y<0 || y>30)
    {
        cout<<"Invalid input";
        return 0;
    }
    Loan o;
    if(s=="home")
    {
        o.home(amt,y)
    }
    else if(s=="personal")
    {
        o.personal(amt,y)
    }
    return 0;
}