#include<iostream>
using namespace std;
class shape {
    public:
    void circle(string shapee){
        double area;
        string shapee;
        if (shapee == "circle" || shapee=="rectangle"){
        if (shapee == "circle"){
            cin>>d1;
        }
        else{
            cin>>d1>>d2;
        }
        if(d1>=1 && d1<=100){
            area = 3.1416 * (d1*d1);
            cout<<area;
        }
        
        }
    else{
        cout<<"Invalid shape type";
    }
        
        if((d1&&d2)>=1 && (d1&&d2)<=100){
            area = d1*d2;
            cout<<area;
        }
       
    }
    
    
};
int main(){
    double d1 , d2 ;
    shape a;
    string shapee ;
    cin>>shapee;
    
    
   
    a.circle(shapee);
    
    
}