#include <iostream>
#include <cmath>
using namespace std;

class Shape {
    public:
    double area(double s) {
        if (s < 0) return -1;
        return s * s;
    }
    
    double area(double l, double b) {
        if (l < 0 || b < 0) return -1;
        return l * b;
    }
    
    double areaCircle(double r) {
        if (r < 0) return -1;
        return 3.14 * r * r;
    }
};

int main() {
    int t;
    cin >> t;
    Shape obj;
    double s, l, b, result;
    
    if (t == 1) {
        cin >> s;
        result = obj.area(s);
    } else if (t == 2) {
        cin >> l >> b;
        result = obj.area(l, b);
    } else if (t == 3) {
        cin >> r;
        result = obj.areaCircle(r);
    } else {
        cout << "Invalid input";
        return 0;
    }
    
    if (result < 0) {
        cout << "Invalid input";
    } else { cout << result; }
    
    return 0;
}