// editor2
#include<bits/stdc++.h>
using namespace std;
struct Area{
    long long area(int side){
        return 1ll*side*side;
    }
    long long area(int length, int width){
        return 1ll*length*width;
    }
    double area(double radius){
        return 3.14*radius*radius;
    }
};
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;
    if(!(cin>>t)){
        cout<<"Invalid input";
        return 0;
    }
    Area A;
    if(t==1){
        long long side;
        if(!(cin>>side)||side<0){
            cout<<"Invalid input";
            return 0;
        }
        cout<<A.area((int)side);
    }
    else if(t==2){
        long long l,w;
        if(!(cin>>l>>w)||l<0||w<0){
            cout<<"Invalid input";
            return 0;
        }
        cout<<A.area((int)l,(int)w);
    }
    else if(t==3){
        long long r;
        if(!(cin>>r)||r<0){
            cout<<"Invalid input";
            return 0;
        }
        cout<<A>area((double)r);
    }
    else{
        cout<<"Invalid input";
    }
    return 0;
}