#include <iostream>
using namespace std;
int main() {
double a, y;
cin >> a;
if (a<-1)
{
y = 1/(a*a);
}
else
{
if (a>=-1 && a<=2)
{
y = a*a;
}
else
{
y = 4;
}
}
cout << y;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewogICAgZG91YmxlIGEsIHk7CiAgICBjaW4gPj4gYTsKICAgIGlmIChhPC0xKQogICAgewogICAgCXkgPSAxLyhhKmEpOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGlmIChhPj0tMSAmJiBhPD0yKQogICAgICAgIHsKICAgICAgICAJIHkgPSBhKmE7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgCXkgPSA0OwogICAgICAgIH0KICAgIH0KICAgIGNvdXQgPDwgeTsKICAgIHJldHVybiAwOwp9