package oj.test;
import java.util.*;
public class Demo6 {
/**
* 简要描述:有一个函数
* y = x x<1;
* y = 2x-1 1<=x<10;
* y = 3x-11 x>=10.
* 写一段程序,输入x,输出y
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
if(x<1)
sop(x);
else if(x<=10)
sop(2*x-1);
else
sop(3*x-11);
}
private static void sop(Object o) {
System.out.println(o);
}
}