main()
{
int x,y;
scanf("%d",&x);
if(x<1) y=x;
else if(x<10) y=2*x-1;
else y=3*x-11;
printf("%d\n",y);
}
main(){
int x;
scanf("%d",&x);
printf("%d",x<1?x:(x>=10?3*x-11:2*x-1));
}
void main(){
int x,y;
printf("input x:");
scanf("%d",&x);
if(x<1) y=x;
else if(x<10) y=2*x-1;
else y=3*x-11;
printf("%d",y);
}
if(x<1) y=x;
else if(x<10) y=2*x-1;
else y=3*x-11;