#include <iostream> using namespace std; int main() { int x,y; cin>>x; if(x<0) y=14-2*x; else if(x>3) y=4; else y=3*x-5; cout<<y; return 0; }