#include <iostream>
using namespace std;
int main() {
// your code goes here
int x;
cin>> x;
switch(x){
case -9999 ... 4:
cout <<(x*x-3*x+4);
break;
default:
cout <<(x+7);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQgeDsKCWNpbj4+IHg7Cglzd2l0Y2goeCl7CgkJY2FzZSAtOTk5OSAuLi4gNDoKCQkJY291dCA8PCh4KngtMyp4KzQpOwoJCQlicmVhazsKCQlkZWZhdWx0OgoJCWNvdXQgPDwoeCs3KTsKCX0KCglyZXR1cm4gMDsKfQ==