#include<iostream>
#include<iomanip>
using namespace std;
int main(){
    string a ;
    int b , f;
    double c, e ,d;
   if(!(d==0 && d==1)){
            cout<<"Invalid input";
            return 0 ;
           
        }
        if(!(m=="Basic"||m=="Standard"||m=="Premium")){
            cout<<"Invalid input";
            return 0 ;
            
        }
        
             if (a == "basic" && d == 1){
                  e = (30.00 * c ) - (6.00 * c);
                  cout<<fixed<<setprecision(2)<<e;
              }  
              else if (a == "Standard"&& d == 1){
                  e = (50.00 * c ) - (10.00 * c);
                  cout<<fixed<<setprecision(2)<<e;
            }
            else if (a == "Premium"&& d == 1){
                  e = (80.00 * c ) - (16.00 * c);
                  cout<<fixed<<setprecision(2)<<e;
            }
            
            else if (a == "basic"&& d == 0){
                  e = (6.00 * c);
                  cout<<fixed<<setprecision(2)<<e;
              }  
            else if (a == "Standard"&& d == 0){
                  e = (10.00 * c);
                  cout<<fixed<<setprecision(2)<<e;
            }
            else if (a == "Pprmium"&& d == 0){
                  e = (16.00 * c);
                  cout<<fixed<<setprecision(2)<<e;
            }
            
        
    }
}