// editor1
#include<iostream>
#include<cmath>
using namespace std;
class Shape{
    public:
    double area(int side){//Square
    if(side <= 0)return -1;
    return side * side;
    }
    double area(int length,int width)
    {//Rectangle
    if(length <= || width <= 0)
    return - 1;
    return length * width;
}
double area(double radius){//Circle
if(radius <= 0)return -1;
return 3.14*radius * radius;}
};
int main(){
    int t;
    cin>>t;
    shape s;
    double result = -1;
    if(t == 1){
        int side;
        if(!(cin >> side)){
            cout << "Invalid input";
            return 0;
        }
        result = s.area(side);
    }
    else if(t == 2){
        int length,width;
        if(!(cin >> length >> width)){
            cout << "Invalid input";
            return 0;
        }
        result = s.area(length,width);
    }
    else if(t == 3){
        dopuble radius;
        if(!(cin >> radius)){
            cout <<"Inavid input";
            return 0;
        }
        result = s.area(radius);
    }
    else{
        cout << "Invalid input";
        return 0;
    }
    if(result == -1)
    cout<<"Invalid input";
    else
    cout<<result;
    return 0;
}