#include<iostream>
#include<iomanip>
using namespace std;
int main(){
    string shape_type;
    cin>>shape_type;
    if(shape_type=="circle"){
        double radius;
        cin>>radius;
        doule area=M_PI*radius*radius;
        cout<<fixed<<setprecision(2)<area<<endl;
    }
    else if(shape_type=="rectangle"){
        double widrth,height;
        cin>>width>>height;
        double area=width*height;
        cout<<fixed<<setprecision(2)<<area<<endl;
    }
    else{
        cout<<"Invalid shape type"<<endl;
    }
    return 0;
}