#include <iostream>
using ll = long long;
using ld = long double;
using namespace std;
signed main() {
ld x;
cin >> x;
if(x >= 0)
cout << x + 3;
else
cout << x * x;
}
#include <iostream>
using ll = long long;
using ld = long double;
using namespace std;
signed main() {
ld x;
cin >> x;
if(x >= 0)
cout << x + 3;
else
cout << x * x;
}