#include int main(void){ double x, y; scanf("%lf", &x); if (x > 0) y = 3 * x + 1; else if (x < 0) y = x / 2 - 11; else y = 1; printf("%lf", y); return 0;}