#include<iostream>
#include<iomanip>
using namespace std;

int main() {
    string itemType;
    float weight, price;
    
    cin >> itemType >> weight >> price;
    
    if(itemType == "fruit" || itemType "vegetable")
    {
        float total = weight * price;
        cout << fixed << setprecision(2) << total;
        }
        else {
            cout << "Invalid input";
        }
        return 0;
}