#include <stdio.h> int main() { int x,y; scanf("%d",&x); if(x<0) y = x-2; else if(x>= 0 && x<10) y = 3*x; else y = 4*x+1; printf("%d",y); return 0; }