$D=int(<>); if($D<=9){ print($D,"\n"); }elsif($D%2==0){ print(int(($D+10)/20),"\n"); }else{ print(($D+9)/2%10,"\n"); }